Closed Bug 282098 Opened 20 years ago Closed 19 years ago

Accessible focus can get trapped inside of closed popup

Categories

(Core :: Disability Access APIs, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

Details

(Keywords: access)

Attachments

(1 file)

When a combo box has focus on a menuitem inside of it, but it closes, a new
focus event should be fired to indicate where focus currently is. In addition,
calls to IAccessible::get_accFocus() should not return a hidden child inside of
the popup.
Attachment #174192 - Flags: review?(Louie.Zhao) → review?(pkwarren)
Comment on attachment 174192 [details] [diff] [review]
When focus is inside popup that becomes hidden, fire focus event for current DOM focus

>Index: accessible/src/base/nsRootAccessible.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/base/nsRootAccessible.cpp,v
>retrieving revision 1.108
>diff -p -u -5 -r1.108 nsRootAccessible.cpp
>--- accessible/src/base/nsRootAccessible.cpp	11 Feb 2005 13:18:39 -0000	1.108
>+++ accessible/src/base/nsRootAccessible.cpp	13 Feb 2005 06:21:32 -0000
>@@ -635,10 +670,26 @@ NS_IMETHODIMP nsRootAccessible::HandleEv
>     if (accessNode) {
>       accessNode->GetDOMNode(getter_AddRefs(targetNode));
>       FireAccessibleFocusEvent(accessible, targetNode);
>     }
>   }
>+  else if (eventType.LowerCaseEqualsLiteral("popuphiding")) {
...

>@@ -714,10 +765,26 @@ NS_IMETHODIMP nsRootAccessible::HandleEv
>     accessible->GetFinalState(&stateData.state);
>     stateData.enable = (stateData.state & STATE_EXPANDED) != 0;
>     stateData.state = STATE_EXPANDED;
>     privAcc->FireToolkitEvent(nsIAccessibleEvent::EVENT_STATE_CHANGE, accessible, &stateData);
>   }
>+  else if (eventType.LowerCaseEqualsLiteral("popuphiding")) {
...

The duplication of code here is unfortunate. The platform specific handling
should really go into the atk/msaa directories.
Attachment #174192 - Flags: review?(pkwarren) → review+
Attachment #174192 - Flags: superreview?(bryner)
Attachment #174192 - Flags: superreview?(bryner) → superreview+
Comment on attachment 174192 [details] [diff] [review]
When focus is inside popup that becomes hidden, fire focus event for current DOM focus

Needed for tight collaboration cycle with screen reader vendor and testers.
Attachment #174192 - Flags: approval1.8b?
Checking in nsRootAccessible.cpp;
/cvsroot/mozilla/accessible/src/base/nsRootAccessible.cpp,v  <-- 
nsRootAccessible.cpp
new revision: 1.109; previous revision: 1.108
done
Checking in nsRootAccessible.h;
/cvsroot/mozilla/accessible/src/base/nsRootAccessible.h,v  <--  nsRootAccessible.h
new revision: 1.45; previous revision: 1.44
done
Checking in nsRootAccessible.cpp;
/cvsroot/mozilla/accessible/src/base/nsRootAccessible.cpp,v  <-- 
nsRootAccessible.cpp
new revision: 1.109; previous revision: 1.108
done
Checking in nsRootAccessible.h;
/cvsroot/mozilla/accessible/src/base/nsRootAccessible.h,v  <--  nsRootAccessible.h
new revision: 1.45; previous revision: 1.44
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment on attachment 174192 [details] [diff] [review]
When focus is inside popup that becomes hidden, fire focus event for current DOM focus

too late for 1.8b1; please land on trunk (which is now open)
Attachment #174192 - Flags: approval1.8b? → approval1.8b-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: