← Back to release summary

Default accessibility semantics for custom elements

Category
DOM
Type
New or changed feature
Status
Enabled by default (Chrome 81)
Intent stage
Prepare to ship

Summary

Lets custom element authors 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.

Standards & signals

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

Samples: https://jsbin.com/gipacadema/1/edit?html,output

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

View on chromestatus.com