## 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

- MDN web docs - Using ARIA: Roles, states, and properties
- MDN web docs - ARIA roles (Reference)
- MDN web docs - `aria-activedescendant` attribute
- MDN web docs - `tabIndex` attribute

### Standards

- W3C - Accessible Rich Internet Applications (WAI-ARIA) 1.2
- W3C - Composite role