ARIA Structure Roles
ARIA role: heading
A title for a section of content at a particular hierarchy level. Prefer h1–h6 with logical hierarchy. Custom heading requires aria-level; do not choose levels for font size. The example demonstrates a native equivalent or preferred alternative and deliberately omits redundant ARIA. Explicit roles do not implement visual presentation, interaction or focus management; verify allowed role/element combinations in ARIA in HTML. Accessibility exposure varies with browser, platform and assistive technology. Test relevant combinations; rendering is not proof of accessibility.
Formal Syntax & Structure
html syntaxhtml
role="heading"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| role | token | Explicit role token heading; use only where allowed. Omit when native semantics match. |
| aria-level | integer | Required for this custom role unless equivalent host semantics apply. Specifies the hierarchical level of a heading, tree item, or other supported structure. For custom headings it is required; prefer native h1–h6. Do not derive levels from visual size; maintain logical hierarchy. Values: positive integer. |
Working Example
Example Snippethtml
<h2>Delivery options</h2>