Closed Bug 569652 Opened 14 years ago Closed 14 years ago

Make sure aria-activedescendant changes can cause only async events

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: davidb, Assigned: davidb)

References

Details

(Whiteboard: [sg:critical][critsmash:investigating])

Attachments

(2 files)

nsDocAccessible::ARIAAttributeChanged should only fire delayed events since it is called in our nsIMutationObserver handling.
Whiteboard: [sg:critical] → [sg:critical][critsmash:investigating]
After some code inspection I realized the best fix is to make nsRootAccessible::FireAccessibleFocusEvent only fire async/delayed events. This allows the code that checks for aria-activedescendant to exist in one place, and alleviates the need for any specialized nsAccEvent for this particular case.

So I made the menu start event fire async, which is probably a good idea anyways since the menu end event is async, and so this should preserve the ordering better.

I'll post a link to try for Marco when I see it and I will report any mochitest failures.
Attachment #450551 - Flags: review?(surkov.alexander)
Attachment #450551 - Flags: feedback?
Attachment #450551 - Flags: feedback? → feedback?(marco.zehe)
Marco, mainly we need to make sure that menu start events still work.
Summary: Fire aria based focus event async → Make sure aria-activedescendant changes can cause only async events
Attachment #450551 - Flags: feedback?(marco.zehe) → feedback+
Comment on attachment 450551 [details] [diff] [review]
make nsRootAccessible::FireAccessibleFocusEvent safe

All Windows screen readers work fine with this try-server build. Menus, sub menus etc. all still are announced as opening and closing like they do in a regular nightly.
Comment on attachment 450551 [details] [diff] [review]
make nsRootAccessible::FireAccessibleFocusEvent safe


>-      if (rootAcc)
>+      if (rootAcc) {
>+        // We can call this method safely because it only fires delayed events.
>         rootAcc->FireAccessibleFocusEvent(nsnull, currentFocus, nsnull, PR_TRUE);

this is unnecessary change I think. "Implementors: " comment inside the method should be enough.
>+            if (menuStartEvent) {
>+              // We must fire this delayed in case it came from a menu that
>+              // uses aria-activedescendant to denote fake menu item focus,
>+              // since in this case we might be unsafe.

this comment must be unnecessary as well.

please add mochitest while you're here ;)
Attachment #450551 - Flags: review?(surkov.alexander) → review+
(In reply to comment #4)
> (From update of attachment 450551 [details] [diff] [review])
> All Windows screen readers work fine with this try-server build. Menus, sub
> menus etc. all still are announced as opening and closing like they do in a
> regular nightly.

Thanks Marco!
No worrisome errors reported by try server.
(In reply to comment #5)

Test coverage for the related change.
Attachment #451097 - Flags: review?(marco.zehe)
Comment on attachment 451097 [details] [diff] [review]
test (try fail - don't check in)

r=me thanks!
Attachment #451097 - Flags: review?(marco.zehe) → review+
Attachment #451097 - Attachment description: test coverage → test (try fail - don't check in)
Fix landed: http://hg.mozilla.org/mozilla-central/rev/2348611d0230

Fixing menu testing fragility will happen on bug 572103.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Group: core-security → core-security-release
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: