Access Accessibility information from JavaScript

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Access Accessibility information from JavaScript

Tobias Bengfort
Hi,

I am not sure where to direct this question, so sorry if this is the
wrong 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.

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?

tobias


signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Access Accessibility information from JavaScript

Chaals McCathie Nevile
On Sat, 23 Jul 2016 14:28:14 +0200, Tobias Bengfort  
<[hidden email]> 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
  [hidden email] - - - Find more at http://yandex.com

Reply | Threaded
Open this post in threaded view
|

Re: Access Accessibility information from JavaScript

Accessys@smart.net


> 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


PS the smiley faces :smile: come thru and is clear in Linux using a text
based browser (Lynx) and javascript off.  (doesn't get more basic than
that)

Bob