Closed
Bug 957254
Opened 11 years ago
Closed 11 years ago
Accessible window events missing for javascript alerts
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: jdiggs, Assigned: jwei)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files, 2 obsolete files)
(deleted),
text/html
|
Details | |
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. View the attached test case in Firefox
2. Load the attached accessible-event listener in a terminal
3. Press the "Press me" button
Expected results: A window:activate event would appear for the resulting alert dialog.
Actual results: There is no window:activate event for the resulting alert dialog.
Reporter | ||
Comment 1•11 years ago
|
||
Comment 2•11 years ago
|
||
alert as it's implemented is not typical window so no events. Joanie, do you want activate events for ARIA dialogs? Should deactivate event be fired? Does it make sense for modal dialogs?
Blocks: eventa11y
Reporter | ||
Comment 3•11 years ago
|
||
I'd like alerts and dialogs to be consistent with alerts and dialogs across the board. Otherwise, there's far too much heuristic custom handling on a per-implementation basis.
* In Firefox, real dialogs (e.g. Preferences) result in window: events
* In Epiphany and Chrome, in addition to the above, the test case attached to this bug result in window: events.
* In Gtk and other desktop-app toolkits, dialogs and alerts result in window: events.
Long way of saying: "Please", "yes", and "I think it does" respectively to your questions. :)
Comment 4•11 years ago
|
||
(In reply to Joanmarie Diggs from comment #3)
> I'd like alerts and dialogs to be consistent with alerts and dialogs across
> the board. Otherwise, there's far too much heuristic custom handling on a
> per-implementation basis.
sure
> Long way of saying: "Please", "yes", and "I think it does" respectively to
> your questions. :)
so if modal dialog is getting closed then you would expect to see deactivate event before it's closed, is that correct?
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to alexander :surkov from comment #4)
> (In reply to Joanmarie Diggs from comment #3)
> > I'd like alerts and dialogs to be consistent with alerts and dialogs across
> > the board. Otherwise, there's far too much heuristic custom handling on a
> > per-implementation basis.
>
> sure
\o/ I owe you a beer. :)
> so if modal dialog is getting closed then you would expect to see deactivate
> event before it's closed, is that correct?
Yes. And this deactivate event should precede the activate event for the app window that is about to become re-active as a result of the modal dialog going away.
Assignee | ||
Comment 6•11 years ago
|
||
Window activate and deactivate events are fired when elements with ARIA role = dialog are shown and hidden. This includes JavaScript alerts.
Assignee: nobody → jwei
Attachment #8368717 -
Flags: review?(trev.saunders)
Comment 7•11 years ago
|
||
Comment on attachment 8368717 [details] [diff] [review]
Added window:activate/deactivate events for dialogs
>+ if (!accessible->IsRoot() && accessible->HasARIARole() &&
>+ accessible->ARIARole() == roles::DIALOG) {
just use accessible->Role()
>+ guint id = g_signal_lookup ("deactivate", MAI_TYPE_ATK_OBJECT);
no space before (
> case nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE:
> g_signal_emit_by_name (atkObj, "load_complete");
>+ if (!accessible->IsRoot() && accessible->HasARIARole() &&
>+ accessible->ARIARole() == roles::DIALOG) {
>+ guint id = g_signal_lookup ("activate", MAI_TYPE_ATK_OBJECT);
>+ g_signal_emit(atkObj, id, 0);
same on both counts here
Attachment #8368717 -
Flags: review?(trev.saunders) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #8368717 -
Attachment is obsolete: true
Assignee | ||
Comment 9•11 years ago
|
||
When accessible->Role() is used instead of accessible->ARIARole(), an assertion is triggered in the treeupdate/test_listbox.xul test. This is when the list item is removed, since we check if accessible->Role() == roles::DIALOG for all hide events. The item is removed through the DOM, so by the time we call NativeRole() on the accessible, GetListAccessible() returns null, triggering the assertion.
Should accessible->Role() checks be kept, and add an assertion flag for the mochitest (and trigger an assertion any time a XUL listitem is removed in a debug build on Linux with accessibility enabled), or keep the ARIARole() check?
Flags: needinfo?(trev.saunders)
Comment 10•11 years ago
|
||
(In reply to Jonathan Wei [:jwei] from comment #9)
> When accessible->Role() is used instead of accessible->ARIARole(), an
> assertion is triggered in the treeupdate/test_listbox.xul test. This is
> when the list item is removed, since we check if accessible->Role() ==
> roles::DIALOG for all hide events. The item is removed through the DOM, so
> by the time we call NativeRole() on the accessible, GetListAccessible()
> returns null, triggering the assertion.
ugh, leave it and add comment like
// XXX handle native dialog accessibles
or something like that.
Flags: needinfo?(trev.saunders)
Assignee | ||
Comment 11•11 years ago
|
||
Attachment #8370049 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 12•11 years ago
|
||
Keywords: checkin-needed
Comment 13•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•