All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.web.rules.Web.S6822.html Maven / Gradle / Ivy

The newest version!

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.

In HTML, certain elements have default roles. Default roles, also known as implicit roles, are roles that are inherently associated with certain HTML elements. These roles provide information about what an element does or the type of content it contains, which is especially useful for assistive technologies like screen readers.

For example, a <button> element has a default role of button. If you explicitly define the role of a <button> element as button, it’s considered redundant because it’s the default role of that element.

<button role="button" onClick={handleClick}>OK</button>

Remove ARIA role attributes when they are redundant.

<button onClick={handleClick}>OK</button>

Resources

Documentation

Standards





© 2015 - 2025 Weber Informatics LLC | Privacy Policy