W3cubDocs

/Web APIs

ElementInternals: ariaRelevant property

Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The ariaRelevant property of the ElementInternals interface reflects the value of the aria-relevant attribute, which indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. This is used to describe what changes in an aria-live region are relevant and should be announced.

Note: Setting aria attributes on ElementInternals allows default semantics to be defined on a custom element. These may be overwritten by author-defined attributes, but ensure that default semantics are retained should the author delete those attributes, or fail to add them at all. For more information see the Accessibility Object Model explainer.

Value

A string containing one or more of the following values, space separated:

"additions"

Additions of Element Nodes within the live region should be considered relevant.

"removals"

Deletion of Nodes from the live region should be considered relevant.

"text"

Changes to the textual content of existing nodes should be considered relevant.

"all"

Equivalent to "additions removals text".

Examples

In this example the value of ariaRelevant is set to "all".

js

this.internals_.ariaRelevant = "all";

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
ariaRelevant 81 81 119 No 68 16.4 81 81 119 58 16.4 13.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/ariaRelevant