--- url: "https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA12" titulek: "ARIA12: Using role=heading to identify headings | WAI | W3C" h1: "Technique ARIA12:Using role=heading to identify headings" popis: "" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 04:42:29" znaku: 3355 slov: 474 kodovani: "utf-8" sha256: "7626061fd232be3e63ef9f5b47d646bf66ed1d0b8494a21b6fd56bddb48a28a7" --- # Technique ARIA12:Using `role=heading` to identify headings ## About this Technique This technique relates to [1.3.1 Info and Relationships](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships) (**Sufficient**). This technique applies to technologies that support [Accessible Rich Internet Applications (WAI-ARIA)](https://www.w3.org/TR/wai-aria/). Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are **not required** to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See [About WCAG Techniques](https://www.w3.org/WAI/WCAG22/Techniques/about). ## Description The purpose of this technique is to provide a way for Assistive Technologies (AT) to identify a piece of content as a heading. Applying `role="heading"` to an element causes an AT (like a screen reader) to treat it as though it were a heading. The `role="heading"` property must be paired with the `aria-level` property to define the heading level. When possible, [use native heading markup](https://www.w3.org/TR/using-aria/#rule1). For example, it is preferable to use an `h1` element, rather than using `
`. Native HTML elements have implicit styling and features that won't necessarily be replicated with ARIA equivalents. For instance, heading elements will have specific styling adjustments made when viewing a page in a browser's Reader Mode. Whereas a `
` will not be styled as a heading, because the underlying element is a `div`. ARIA only modifies the way an element is exposed to assistive technology, it does nothing to change the implicit style or functionality of the element it is applied to. ## Examples ### Example 1: Simple headings This example demonstrates how to implement headings using `role="heading"` and `aria-level`. ```
Global News Items
... a list of global news with editorial comment....
Politics
... a list of global political news stories ... ``` ### Example 2: Additional heading levels This example demonstrates how to implement a level 7 heading using `role="heading"` and the `aria-level` attribute. Since HTML only supports headings up to level 6, there is no native element to provide these semantics. ```
Fruit Trees
Apples

Apples grow on trees in areas known as orchards...

...
Jonagold

Jonagold is a cross between the Golden Delicious and Jonathan varieties...

``` ## Related Resources *No endorsement implied.* - [Accessible Rich Internet Applications (WAI-ARIA), `heading` role.](https://www.w3.org/TR/wai-aria/#heading) - [Accessible Rich Internet Applications (WAI-ARIA), `aria-level` property.](https://www.w3.org/TR/wai-aria/#aria-level) - [WAI-ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/) - [HTML, the `h1`, `h2`, `h3`, `h4`, `h5`, and `h6` elements](https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements) . ## Tests ### Procedure 1. Examine each element with the attribute `role="heading"` . 2. Determine whether the content of the element is appropriate as a heading. 3. Determine whether the `aria-level` value is the appropriate hierarchical level. ### Expected Results - #2 and #3 are true. Back to Top