Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to do about ARIA? #14

Open
domenic opened this issue May 5, 2014 · 4 comments
Open

What to do about ARIA? #14

domenic opened this issue May 5, 2014 · 4 comments

Comments

@domenic
Copy link
Owner

domenic commented May 5, 2014

A lot of the vanilla HTMLElement elements have implicit or overridable ARIA roles (I don't entirely understand the difference):

http://www.whatwg.org/specs/web-apps/current-work/#wai-aria

Presumably if we registered e.g. <custom-nav> as HTMLElement, or if we did class CustomHTMLElement extends HTMLElement {} and registered <custom-nav> as CustomHTMLElement, then <custom-nav>s would not get the appropriate navigation role.

How do we hook in to this tag-name to aria-role map? (It's actually more than just tag names; there are other things involved.)

We could emulate it via a switch statement in CustomHTMLElement, which upon creation sets the appropriate role attribute.

But then <custom-nav> wouldn't behave the same way as normal <nav>, e.g. customNav.getAttribute("role") would give "navigation" instead of null.

Seems like we may have found, even in our simplest of elements, a non-extensible part of the web?

@stevefaulkner
Copy link

the aria roles/states/properties are used as an abstraction of the various platform accessibility APIs see http://rawgit.com/w3c/html-api-map/master/index.html so there is no ARIA role/state/properties exposed via the DOM or in the browser acc layer unless authors declare them as attributes role=foo ,aria-foo. Even when explicitly declared there is generally no ARIA foo property exposed in acc layer.

@domenic
Copy link
Owner Author

domenic commented May 6, 2014

Yes, it does seem like there's a missing primitive involved, that queries an element to ask what its implicit and/or overridable ARIA roles are, and then uses them appropriately and/or lets them be overridden by role attributes.

@domenic
Copy link
Owner Author

domenic commented Aug 28, 2014

@domenic
Copy link
Owner Author

domenic commented Aug 28, 2014

I realized upon re-reading my May 6 comment that my current (icky) solution sketches are focused on maintaining the correct underlying ARIA state at all times. A better approach would probably be something like what I suggested then, e.g. to have a callback such that when the system queries for the element's aria role or stoperties, we can give them back. This seems promising, although possibly it might not play as well with implementations. Need to dig into Chrome's code tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants