profile
viewpoint

Ask questionsDefault Accessibility Semantics for Custom Elements

Request for Mozilla Position on an Emerging Web Specification

  • Specification Title: Default Accessibility Semantics for Custom Elements
  • Specification or proposal URL:
    • https://github.com/whatwg/html/pull/4658
    • https://github.com/alice/aom/blob/gh-pages/explainer.md#per-instance-dynamic-semantics-via-the-elementinternals-object
  • Mozillians who can provide input (optional): Jamie Teh

Other information

This will allow Custom Elements to have "default" accessibility semantics, analogous to how built-in elements have "implicit" or "native" semantics.

e.g.

this._internals.role = "checkbox";
this._internals.ariaChecked = "false";

These can be overridden using regular ARIA attributes as normal.

This is currently being implemented in Blink, and we intend to ship this alongside Reflecting IDREF/IDREF list ARIA attributes to element references.

mozilla/standards-positions

Answer questions nschonni

Just making the comment here instead of the PR, but I think this should be important given discussions like https://twitter.com/sarahmei/status/1198069119897047041 which have people avoiding aspects of web components given accessibility gotchas

useful!

Related questions

RFP: Constructable Stylesheets hot 1
HTML: enterkeyhint attribute hot 1
Github User Rank List