Intent to Implement: Default Accessibility Semantics for Custom Elements

113 views
Skip to first unread message

Rakina Zata Amni

unread,
Aug 7, 2019, 9:49:59 PM8/7/19
to blink-dev

Contact emails

abox...@chromium.org, dom...@chromium.org, tk...@chromium.org, rak...@chromium.org 


Explainer

https://github.com/alice/aom/blob/gh-pages/explainer.md#per-instance-dynamic-semantics-via-the-elementinternals-object


Design docs/spec

Specification: https://github.com/whatwg/html/pull/4658 


TAG review

https://github.com/w3ctag/design-reviews/issues/401


Summary

With this feature, custom element authors can use ElementInternals to set a custom element's default accessibility role, states, and properties, much like the default accessibility semantics for native elements.


Motivation

There is currently no way for a custom element author to set default custom element accessibility semantics for a custom element. They can use AOM and modify ARIA attributes on the custom element directly, however these are user-visible and user-modifiable. An example of why this is bad: if the default attributes are modified by the user, and later on they remove the attribute, the default value would not be restored.


Risks

Interoperability and Compatibility

In past discussions at web components F2F meetings, other browser vendors have been supportive of the general idea. Several representatives from other browsers are also present on the pull request thread. However, none of them have given clear signals about this specific API proposal.


In general, the feature is quite small and should be easily implementable in other browsers.


Firefox: No public signals

Edge: No public signals

Safari: No public signals

Web developers: No signals


Ergonomics

This feature is built on top of the ElementInternals API.


Activation

The API is the same as ARIA properties, but instead of modifying/getting the properties on the Element directly, the web developer would do it on ElementInternals.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux,

Chrome OS, Android, and Android WebView)?

Yes


Is this feature fully tested by web-platform-tests?

WPT pending, some in CL


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5962105603751936 


Reply all
Reply to author
Forward
0 new messages