ariaActiveDescendantTabIndex
Reports elements with aria-activedescendant without tabIndex.
✅ This rule is included in the jsxlogicalandlogicalStrictpresets.
aria-activedescendant is used to manage focus within a composite widget.
Elements with this attribute should be tabbable, either through an inherent tabIndex (like <input>) or an explicit tabIndex attribute.
Without proper tabIndex, keyboard users cannot reach the element to interact with it.
Examples
Section titled “Examples”<JSX.IntrinsicElements.div: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
div AriaAttributes["aria-activedescendant"]?: string | undefined
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-activedescendant={const someID: any
someID} />;<JSX.IntrinsicElements.span: DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>
span AriaAttributes["aria-activedescendant"]?: string | undefined
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-activedescendant="item-1" /><JSX.IntrinsicElements.div: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
div AriaAttributes["aria-activedescendant"]?: string | undefined
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-activedescendant={const someID: any
someID} HTMLAttributes<HTMLDivElement>.tabIndex?: number | undefined
tabIndex={0} />;<JSX.IntrinsicElements.div: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
div AriaAttributes["aria-activedescendant"]?: string | undefined
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-activedescendant={const someID: any
someID} HTMLAttributes<HTMLDivElement>.tabIndex?: number | undefined
tabIndex={-1} />;<JSX.IntrinsicElements.input: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>
input AriaAttributes["aria-activedescendant"]?: string | undefined
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-activedescendant={const someID: any
someID} />;<JSX.IntrinsicElements.button: DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>
button AriaAttributes["aria-activedescendant"]?: string | undefined
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria-activedescendant={const someID: any
someID} />;When Not To Use It
Section titled “When Not To Use It”If you’re not using aria-activedescendant or have a custom focus management system, you can disable this rule.