org.sonar.l10n.javascript.rules.javascript.S6824.html Maven / Gradle / Ivy
Why is this an issue?
ARIA (Accessible Rich Internet Applications) attributes are used to enhance the accessibility of web content and web applications. These attributes
provide additional information about an element’s role, state, properties, and values to assistive technologies like screen readers.
This rule checks that ARIA roles or aria-*
attributes are not used in unsupported DOM elements, which are mostly invisible such as
meta
, html
or head
.
How to fix it in JSX
Check if you are using ARIA roles or aria-*
attributes in unsupported DOM elements.
<title aria-hidden="false">My beautiful web page</title>
To fix the code, remove the extra ARIA role or aria-*
attributes from the unsupported DOM elements.
<title>My beautiful web page</title>
Resources
Documentation
- MDN web docs - Using ARIA: Roles, states, and
properties
- MDN web docs - ARIA roles (Reference)
Standards