ARIA documents should fire document loading events

RESOLVED FIXED in mozilla16

Status

()

Core
Disability Access APIs
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: surkov, Assigned: surkov)

Tracking

(Blocks: 1 bug)

unspecified
mozilla16
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
We were asked to fire document loading events on ARIA documents (like role="dialog"). 

For the start we can fire document loading complete when ARIA dialog appears in the tree. We can delay an event while ARIA document has aria-busy.
(Assignee)

Comment 1

5 years ago
Created attachment 629784 [details] [diff] [review]
patch

ignore aria-busy stuffs, they complicate the logic and no evidence the web really needs it
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #629784 - Flags: review?(trev.saunders)
Attachment #629784 - Flags: feedback?(dbolter)
Comment on attachment 629784 [details] [diff] [review]
patch

Review of attachment 629784 [details] [diff] [review]:
-----------------------------------------------------------------

Fine with me. I agree with comment 1.
Attachment #629784 - Flags: feedback?(dbolter) → feedback+
Comment on attachment 629784 [details] [diff] [review]
patch

>+
>+  // Fire document load complete on ARIA documents.
>+  // XXX: we should delay an event if the ARIA document has aria-busy.
>+  if (aRoot->HasARIARole() && !aRoot->IsDoc()) {
>+    a11y::role role = aRoot->ARIARole();
>+    if (role == roles::DIALOG || role == roles::DOCUMENT)

kind of funny we do it for dialogs too, but I guss its sort of reasonable

>+      FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE,
>+                                 aRoot->GetContent());

it'd be nice if you didn't add to the event firing based on nodes.  I'd be sort of fine with a temporary inline function that got the accessibles node and fired the event.

>+    {
>+      gQueue = new eventQueue();
>+
>+      gQueue.push(new showARIADialog("dialog"));

it'd be nice to have one for ria documents in case logic changes somehow one day.
Attachment #629784 - Flags: review?(trev.saunders) → review+
(Assignee)

Comment 4

5 years ago
(In reply to Trevor Saunders (:tbsaunde) from comment #3)

> kind of funny we do it for dialogs too, but I guss its sort of reasonable

yep but we were asked for this and after all we do that anyway if you apply proper ARIA role to document.

> >+      FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE,
> >+                                 aRoot->GetContent());
> 
> it'd be nice if you didn't add to the event firing based on nodes.  I'd be
> sort of fine with a temporary inline function that got the accessibles node
> and fired the event.

I wouldn't do this time since coalescence happens by DOM tree. I need to reorg all this code one day.

> >+      gQueue.push(new showARIADialog("dialog"));
> 
> it'd be nice to have one for ria documents in case logic changes somehow one
> day.

ok
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f29f00df2ff
Flags: in-testsuite+
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/0f29f00df2ff
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.