Favorites

HTML aria-activedescendant ARIA Attribute

aria-activedescendant
ARIA AttributeThis ARIA attribute is supported by all modern browsers.
Updated 28th November 2026

The aria-activedescendant attribute points to the child of a composite widget that is currently active, while keyboard focus stays on the widget itself.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

The aria-activedescendant attribute identifies the active descendant of a composite widget, such as the highlighted option in a listbox or combobox. DOM focus stays on the container (or on the text field of a combobox), and the attribute holds the id of the item that should be treated as focused. Screen readers announce that item as if it had received focus.

This is one of two ways to manage focus inside a widget. The other is a "roving tabindex", where focus really moves from item to item. aria-activedescendant is useful when focus has to stay in one place, for example in a combobox where the user keeps typing while moving through suggestions with the arrow keys.

The element with the attribute must be focusable (natively, or with tabindex="0"), and the referenced element must be a descendant of it or owned by it through aria-owns or aria-controls. Update the value with JavaScript as the user moves, and scroll the active item into view, because browsers do not do this for you. Give the active item a visible highlight too, since there is no focus ring on it.

Properties

Type
Relationship
Value
ID reference
Default
None
Used with
application, combobox, grid, group, listbox, menu, menubar, radiogroup, row, searchbox, spinbutton, tablist, textbox, toolbar, tree, treegrid

Syntax

<element aria-activedescendant="id">

Values

  • ID referenceThe id of the currently active child element.

Example

<ul role="listbox" tabindex="0" aria-label="Fruit" aria-activedescendant="opt1" id="lb"
style="list-style:none;padding:0;width:160px;border:1px solid #888">
<li role="option" id="opt1" aria-selected="true">Apple</li>
<li role="option" id="opt2" aria-selected="false">Banana</li>
<li role="option" id="opt3" aria-selected="false">Cherry</li>
</ul>
<style>[role=option]{padding:4px 8px}[aria-selected=true]{background:#2563eb;color:#fff}</style>
<script>
var lb = document.getElementById('lb');
lb.addEventListener('keydown', function (e) {
var opts = [].slice.call(lb.querySelectorAll('[role=option]'));
var i = opts.findIndex(function (o) { return o.id === lb.getAttribute('aria-activedescendant'); });
if (e.key === 'ArrowDown') i = Math.min(i + 1, opts.length - 1);
else if (e.key === 'ArrowUp') i = Math.max(i - 1, 0);
else return;
e.preventDefault();
opts.forEach(function (o, n) { o.setAttribute('aria-selected', n === i); });
lb.setAttribute('aria-activedescendant', opts[i].id);
});
</script>

Browser Support

The following information will show you the current browser support for the aria-activedescendant ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.

This ARIA attribute is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee