aria-owns

14 views
Skip to first unread message

Dominic Mazzoni

unread,
Jun 26, 2015, 2:59:18 AM6/26/15
to browser-acce...@googlegroups.com
The canary channel of Google Chrome now has support for aria-owns rearranging the accessibility tree internally, so AT doesn't have to implement support. It allows you to use aria-owns to do just about any arbitrary rearranging.

This wasn't my idea - I decided to implement it because I believe Mozilla already indicated interest in trying this approach too. See this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1133213

I made this demo page showing off some of the cool things you can do with aria-owns now:


Here are some of the decisions I made. I'm happy to reconsider any of these, but I wanted to just throw something out there useful as a starting point for discussions.

* If a node has natural children and also has aria-owns, the aria-owns children come last. Totally arbitrary but seems more useful than not allowing this. I don't think authors should depend on them coming last but I do think it should be allowed to do this if you don't care about the order.
* The order of aria-owns children is significant; you can use it to reorder the natural children of a node.
* It will not allow cycles. If you do author a cycle, you shouldn't count on consistent behavior; which nodes actually end up owned by other nodes within that cycle will be arbitrary and may change from one page load to another.
* It will not allow a node to own an ancestor of itself, whether part of a cycle or not.
* It ignores a node trying to own itself.
* If there are two elements with the same id, it will own whatever document.getElementById() returns.
* If two nodes try to own the same id, it's an author errors; it's arbitrary which one wins and may change from one page load to another.

Finally:
* It keeps track of ids that are referenced by aria-owns but whose ids haven't been found in the document. When an element appears in the document with an id or an element's id changes, it does a quick hash lookup to see if any elements with aria-owns need to be updated.
* The correct notifications are fired when a node gets reparented due to dynamically changing aria-owns.

I'm sure I missed something. Bug reports welcome!

Alexander Surkov

unread,
Dec 4, 2015, 7:49:52 AM12/4/15
to Dominic Mazzoni, browser-acce...@googlegroups.com
Btw, we've got it implemented in Firefox 45.

--
You received this message because you are subscribed to the Google Groups "Browser Accessibility Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to browser-accessibil...@googlegroups.com.
To post to this group, send email to browser-acce...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/browser-accessibility-dev/CAFz-FYzL0k6vAHZy2BrdQNtNS3tYQ%2BUmdSjAQOg_bOA0aWneeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Dominic Mazzoni

unread,
Dec 15, 2015, 1:59:58 PM12/15/15
to Alexander Surkov, browser-acce...@googlegroups.com
I just tested it in a Firefox nightly build and it worked perfectly for me. Well done!

Alexander Surkov

unread,
Dec 15, 2015, 2:01:55 PM12/15/15
to Dominic Mazzoni, browser-acce...@googlegroups.com
Awesome! Thank you for giving it a try!
Reply all
Reply to author
Forward
0 new messages