Skip to content

New feature: ARIA element-valued JS properties #4147

Description

@LeaVerou

Specification

https://w3c.github.io/aria/#ARIAMixin

Description

Currently, there is aria-attribute-reflection but this is about all aria* JS properties.
However, the ones ending in Element or Elements are a distinct feature, since they provide an imperative way to implement patterns that are otherwise impossible, including:

  • cross-root ARIA,
  • polyfill features like Reference Target
  • prototype ARIA aggregation mechanisms without having to pollute the DOM with ids

Whereas properties that simply reflect the value of the corresponding attribute are a relatively minor consistency improvement.

Name/hierarchy ideas:

  • Separate aria-element-reflection key
  • New aria-attribute-reflection-element, rename aria-attribute-reflectionaria-attribute-reflection-idref, aria-attribute-reflection becomes a group with both

Documentation

See individual BCD keys

api.Element.ariaActiveDescendantElement
api.ElementInternals.ariaActiveDescendantElement
api.Element.ariaControlsElements
api.ElementInternals.ariaControlsElements
api.Element.ariaDescribedByElements
api.ElementInternals.ariaDescribedByElements
api.Element.ariaDetailsElements
api.ElementInternals.ariaDetailsElements
api.Element.ariaErrorMessageElements
api.ElementInternals.ariaErrorMessageElements
api.Element.ariaFlowToElements
api.ElementInternals.ariaFlowToElements
api.Element.ariaLabelledByElements
api.ElementInternals.ariaLabelledByElements

Browser support

I clauded a testcase here and ran it in all three major desktop browsers.

The results were:

  • Chrome 135+
  • Firefox 136+
  • Safari 16.5+

I did not run it in any mobile browsers.

So basically Baseline 2025, which is meaningfully different than aria-attribute-reflection's Widely Available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature definitionCreating or defining new features or groups of features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions