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

org.sonar.l10n.web.rules.Web.S6823.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.

The aria-activedescendant attribute is used to enhance the accessibility of composite widgets by managing focus within them. It allows a parent element to retain active document focus while indicating which of its child elements has secondary focus. This attribute is particularly useful in interactive components like search typeahead select lists, where the user can navigate through a list of options while continuing to type in the input field.

This rule checks that DOM elements with the aria-activedescendant property either have an inherent tabIndex or declare one.

How to fix it

Make sure that DOM elements with the aria-activedescendant property have a tabindex property, or use an element with an inherent one.

Code examples

Noncompliant code example

<div aria-activedescendant="descendantId">
  <div id="descendantId"></div>
</div>

Compliant solution

<div aria-activedescendant="descendantId" tabIndex="0">
  <div id="descendantId"></div>
</div>

Resources

Documentation

Standards





© 2015 - 2025 Weber Informatics LLC | Privacy Policy