Re: Access Accessibility information from JavaScript

On Sat, 23 Jul 2016 14:28:14 +0200, Tobias Bengfort  
<tobias.bengfort@posteo.de> wrote:

> I am not sure where to direct this question, so sorry if this is the
> wrong channel.

It's the right channel.

> I just realized that there is no JavaScript API to access accessibility
> information. I am focusing on the role, but this probably also applies
> to other topics.

Right.

> The straight-forward way to get an element's role is
> `element.getAttribute('role')`. But this does not work for implicit
> roles. The actual role is calculated anyway by the browser, so I do not
> see any reason against exposing it as something like `element.role`.
> Taking this one step further, I guess it could also be useful to use the
> role in CSS selectors, but that is probably too far away for now.
>
> I cannot be the first person thinking about this. Is there any prior
> discussion that explains why this is not included in any spec? Or is
> there a spec that I missed?

https://github.com/WICG/a11yapi and  
https://github.com/cyns/wapa/blob/master/ScriptAccessibility.md are as far  
as I know of anybody getting.

Which is to say people have played around with it but as far as I know it  
hasn't got beyond experimental yet :(

cheers

Chaals

-- 
Charles McCathie Nevile - web standards - CTO Office, Yandex
  chaals@yandex-team.ru - - - Find more at http://yandex.com

Received on Saturday, 23 July 2016 15:58:58 UTC