id | name | rule_type | description | accessibility_requirements | input_aspects | authors | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b49b2e |
Heading is descriptive |
atomic |
This rule checks that headings describe the topic or purpose of the content.
|
|
|
|
This rule applies to any element with the semantic role of heading that is either visible or included in the accessibility tree.
Note: This rule only applies to elements with the semantic role of heading. Thus, it is a partial check for WCAG 2.0 success criterion 2.4.6, which applies to all headings. "Heading" is used in its general sense and includes headlines and other ways to add a heading to different types of content. This includes elements that are not marked up as headings in the code, but still act visually as headings, e.g. by larger and/or bolder text.
Each target element describes the topic or purpose of its section of the content.
Note: Headings do not need to be lengthy. A word, or even a single character, may suffice.
There are currently no assumptions.
There are no major accessibility support issues known for this rule.
- Understanding Success Criterion 2.4.6: Headings and Labels
- G130: Providing descriptive headings
- H42: Using h1-h6 to identify headings
- ARIA12: Using role=heading to identify headings
- HTML 5.2 Standard - Heading content
Heading marked up with h1
element that describes the topic or purpose of its section of the content.
<h1 class="target">Opening Hours</h1>
<p>We are open Monday through Friday from 10 to 16</p>
Heading marked up with role="heading"
that describes the topic or purpose of its section of the content.
<span role="heading" aria-level="1">Opening Hours</span>
<p>We are open Monday through Friday from 10 to 16</p>
Heading marked up with role="heading"
that describes the topic or purpose of its section of the content, with a default aria-level assigned.
<span role="heading">Opening Hours</span>
<p>We are open Monday through Friday from 10 to 16</p>
Heading marked up with h1
element with an image that describes the topic or purpose of its section of the content.
<h1 class="target"><img scr="../test-assets/opening_hours_icon.png" alt="Opening hours" /></h1>
<p>We are open Monday through Friday from 10 to 16</p>
Heading marked up with h1
element that is a single character that describes the topic or purpose of its section of the content.
<h1 class="target">A</h1>
<dl>
<dt>airplane</dt>
<dd>
a powered flying vehicle with fixed wings and a weight greater than that of
the air it displaces.
</dd>
<dt>apple</dt>
<dd>
the round fruit of a tree of the rose family, which typically has thin green
or red skin and crisp flesh.
</dd>
</dl>
Heading marked up with role="heading"
that describes the topic or purpose of its section of the content. The heading is positioned off screen and is included in the accessibility tree.
<span role="heading" aria-level="1"
style="position: absolute; top: -9999px; left: -9999px;"
>Opening Hours</span
>
<p style="position: absolute; top: -9999px; left: -9999px;">
We are open Monday through Friday from 10 to 16
</p>
Heading marked up with h1
element that describes the topic or purpose of its section of the content. The heading is visible, but is not included in the accessibility tree.
<h1 class="target" aria-hidden="true">Opening Hours</h1>
<p>We are open Monday through Friday from 10 to 16</p>
Heading marked up with h1
element that does not describe the topic or purpose of its section of the content.
<h1 class="target">Weather</h1>
<p>We are open Monday through Friday from 10 to 16</p>
Heading marked up with role="heading"
that does not describe the topic or purpose of its section of the content.
<span role="heading" aria-level="1">Weather</span>
<p>We are open Monday through Friday from 10 to 16</p>
Heading marked up with role="heading"
that does not describe the topic or purpose of its section of the content. The heading is positioned off screen and is included in the accessibility tree.
<span role="heading" style="position: absolute; top: -9999px; left: -9999px;"
>Weather</span
>
<p style="position: absolute; top: -9999px; left: -9999px;">
We are open Monday through Friday from 10 to 16
</p>
Heading marked up with h1
element that does not describe the topic or purpose of its section of the content. The heading is visible, but is not included in the accessibility tree.
<h1 class="target" aria-hidden="true">Weather</h1>
<p>We are open Monday through Friday from 10 to 16</p>
No heading.
<p>We are open Monday through Friday from 10 to 16</p>
Heading that is neither visible to users, nor included in the accessibility tree.
<h1 style="display: none;">Opening hours</h1>
<p>We are open Monday through Friday from 10 to 16</p>
Empty heading marked up with h1
is not visible.
<h1></h1>
Empty heading marked up with role="heading"
is not visible.
<p role="heading" aria-level="1"></p>