Last Comment Bug 759833 - ARIA documents should fire document loading events
: ARIA documents should fire document loading events
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: alexander :surkov
:
: alexander :surkov
Mentors:
Depends on:
Blocks: aria
  Show dependency treegraph
 
Reported: 2012-05-30 10:58 PDT by alexander :surkov
Modified: 2012-06-08 13:54 PDT (History)
2 users (show)
surkov.alexander: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.11 KB, patch)
2012-06-04 08:14 PDT, alexander :surkov
tbsaunde+mozbugs: review+
dbolter: feedback+
Details | Diff | Splinter Review

Description alexander :surkov 2012-05-30 10:58:51 PDT
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.
Comment 1 alexander :surkov 2012-06-04 08:14:54 PDT
Created attachment 629784 [details] [diff] [review]
patch

ignore aria-busy stuffs, they complicate the logic and no evidence the web really needs it
Comment 2 David Bolter [:davidb] 2012-06-04 08:23:14 PDT
Comment on attachment 629784 [details] [diff] [review]
patch

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

Fine with me. I agree with comment 1.
Comment 3 Trevor Saunders (:tbsaunde) 2012-06-06 22:42:07 PDT
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.
Comment 4 alexander :surkov 2012-06-06 23:19:40 PDT
(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
Comment 6 Ed Morley [:emorley] 2012-06-08 13:54:54 PDT
https://hg.mozilla.org/mozilla-central/rev/0f29f00df2ff

Note You need to log in before you can comment on or make changes to this bug.