The HTML aria-details attribute
The aria-details attribute references the id of an element that holds extended, structured details about the current element — for example a long description of a chart. Unlike a description, the details can contain rich markup the user can navigate to.
Overview
The aria-details attribute references an element that provides extended, structured details about this element.
It is one of ARIA's naming and description properties, which give an element an accessible name or description for assistive technology. Whenever you can, associate visible text — a <label>, or aria-labelledby pointing at on-screen text — so sighted and screen-reader users get the same information, rather than hiding it in an invisible string.
Like all ARIA, aria-details changes only the accessibility tree — what assistive technology perceives — never the element's behavior or appearance. The first rule of ARIA applies: if a native HTML element or attribute conveys this, use that instead, and only reach for ARIA when nothing native fits.
Syntax
<img src="chart.png" alt="Sales" aria-details="chart-desc">
<div id="chart-desc"> … full description … </div>
Values
| Value |
|---|
| One or more element id values. |
Example
<img src="q4.png" alt="Q4 revenue chart" aria-details="q4-detail">
<section id="q4-detail"><h3>Q4 revenue</h3><p>…</p></section>
Best practices
- Follow the first rule of ARIA — use a native HTML element or attribute that conveys this where one exists, rather than adding ARIA.
- Prefer referencing visible text (a <label> or aria-labelledby) over an invisible string where possible.
- Use aria-label only when there is no suitable on-screen text to reference.
- Keep the name concise and meaningful — it is exactly what a screen reader announces.