Closed Bug 349522 Opened 18 years ago Closed 18 years ago

all dialogs fires no a11y events

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: parente, Assigned: evan.yan)

References

Details

(Keywords: access, regression)

Attachments

(1 file, 1 obsolete file)

(deleted), patch
aaronlev
: review+
Details | Diff | Splinter Review
The Minefield - Restore Previous Session dialog appears in the accessibility hierarchy in at-poke, but fires no window:activate or focus: events when tabbing between its buttons. An AT is never informed of its presence.
Assignee: aaronleventhal → nobody
Blocks: keya11y
Keywords: access
Tested on Windows with Mozilla 1.8 / Firefox 2 (8/22/2006) and it works.
Summary: Restore previous session dialog fires no events → Restore previous session dialog fires no a11y events
confirmed. Alert window of Firefox do not fire activate/deactivate/focus event currently.
Assignee: nobody → Evan.Yan
Severity: normal → major
all the js alert dialog have this problem. and it works fine in FF2.0
Keywords: regression
Summary: Restore previous session dialog fires no a11y events → all dialogs fires no a11y events
not only js alert, but also all dialogs, like "about" and "add bookmark", fire no a11y events.
Attached patch patch (obsolete) (deleted) — Splinter Review
make GetRootAccessible() work for alert and dialog.
Attachment #236063 - Flags: review?(aaronleventhal)
Comment on attachment 236063 [details] [diff] [review] patch What about Windows? It's surprising if this is the fix, as I'm seeing the same problem.
Aaron, does this bug also exist on Windows with trunk build? the patch works for me on Linux.
Comment on attachment 236063 [details] [diff] [review] patch There are 2 problems with this: 1) In the case of an embedded HTML area, the root accessible could be ROLE_DOCUMENT. 2) A ROLE_ALERT can exist anywhere in the hierachy. For example, the popup notification window is ROLE_ALERT. If you really want the root accessible a better test is to see if the accessible has a parent. If there is no parent, it's the root. At least that is true when we run in MSAA -- is it true under Linux/ATK? Or, you might have to add a method to nsIAccessible or nsIAccessibleDocument in order to get the root accessible. I think Hwaara said he needed that.
Attachment #236063 - Flags: review?(aaronleventhal) → review-
> There are 2 problems with this: > 1) In the case of an embedded HTML area, the root accessible could be > ROLE_DOCUMENT. GetRootAccessible() in nsWindow is for dispatching window:activated/deactivated events, we don't fire them for embeded HTML area, right? > 2) A ROLE_ALERT can exist anywhere in the hierachy. For example, the popup > notification window is ROLE_ALERT. > In fact, GetRole() returns ROLE_DIALOG for both of js alert and real dialogs, so only "role == nsIAccessible::ROLE_DIALOG" is needed for this bug. js alert's role is ROLE_ALERT in at-poke, I believe GetFinalRole() will return the real role - ROLE_ALERT for js alert. I added "role == nsIAccessible::ROLE_ALERT" is just for in case. It turns out I was wrong, I need to remove the comparison of ROLE_ALERT. > If you really want the root accessible a better test is to see if the > accessible has a parent. If there is no parent, it's the root. At least that is > true when we run in MSAA -- is it true under Linux/ATK? > No. Under Linux/ATK, every window is a rootAccessible, and they all have the same parent - nsAppRootAccessible, one instance for the whole application. > Or, you might have to add a method to nsIAccessible or nsIAccessibleDocument in > order to get the root accessible. I think Hwaara said he needed that. > as my commment above, GetRootAccessible would be platform-dependent, right?
> Under Linux/ATK, every window is a rootAccessible, and they all have the > same parent - nsAppRootAccessible, one instance for the whole application. Right, so would a cleaner, more sustainable test be to see if the parent is the app root accessible? So your loop would keep track of the previousParentAccessible. if parentAccessible's role == nsIAccessible::ROLE_APP_ROOT then return previousParentAccessible.
Attached patch patch v2 (deleted) — Splinter Review
return docAcc as root accessible when its parent is app root accessible
Attachment #236063 - Attachment is obsolete: true
Attachment #236195 - Flags: review?(aaronleventhal)
Comment on attachment 236195 [details] [diff] [review] patch v2 I'm not sure I like using the name docAcc there. It's a bit confusing in that it's not always for a document (in the loop). Maybe choose a different name for that. You can optimize this a bit further as follows: while (PR_TRUE) { docAcc->GetParent(getter_AddRefs(parentAcc)); if (!parentAcc) { break; } parentAcc->GetRole(&role); if (role == nsIAccessible::ROLE_APP_ROOT) { NS_ADDREF(*aAccessible = docAcc); break; } docAcc = parentAcc; }
Attachment #236195 - Flags: review?(aaronleventhal) → review+
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: