W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2016

Access Accessibility information from JavaScript

From: Tobias Bengfort <tobias.bengfort@posteo.de>
Date: Sat, 23 Jul 2016 14:28:14 +0200
To: WAI IG <w3c-wai-ig@w3.org>
Message-ID: <21d86c77-8bec-5e71-8f3e-bf08df66e31b@posteo.de>

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?


Received on Saturday, 23 July 2016 12:28:47 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 23 July 2016 12:28:48 UTC