Text can resize up to 200% with no loss of information - 1.4.4 AA
Text optically measuring >= ~18px has a 3:1 minimum contrast ratio - 1.4.3 AA
Text optically measuring < ~18px has a 4.5:1 minimum contrast ratio - 1.4.3 AA
Heading level structure is documented 1.3.1 A
2
Operable
Headings describe topic or purpose in clear language - 2.4.6 AA
4
Robust
Meets criteria across platforms, devices and viewports 4.0.0 AA
Name and role is documented - 4.1.2 A
A
heading: h1, h2, h3
must work for people with disabilities:
✓ Low vision
Text can resize up to 200% with no loss of information - 1.4.4 AA
Text optically measuring >= ~18px has a 3:1 minimum contrast ratio - 1.4.3 AA
Text optically measuring < ~18px has a 4.5:1 minimum contrast ratio - 1.4.3 AA
Meets criteria across platforms, devices and viewports 4.0.0 AA
✓ Cognitive
Headings describe topic or purpose in clear language - 2.4.6 AA
✓ Blindness
Heading level structure is documented 1.3.1 A
Name and role is documented - 4.1.2 A
Usage
Headings are not just larger text
Headings must be logically ordered.
Arrow keys will browse headings (not the tab key)
Headings must not receive focus
Annotations for headings
Start with a single <h1> per page (typically the same as the <title>)
Title major sections with <h2>
Subsections with <h3>
It should be rare that <h4> and beyond is required.
Code examples
<h1>My favorite taco recipe</h1><!-- Author's entire life story
as it relates to tacos --><h2>Ingredients</h2><!-- List of ingredients --><h2>Steps</h2><h3>Preparing the protein</h3><!-- List of instructions --><h3>Preparing the vegetables</h3><!-- List of instructions --><h3>Assembly and plating</h3><!-- List of instructions --><h2>Nutrition information</h2><!-- List of nutrition info --><h2>Related receipes</h2><!-- List of related recipes -->
Complex headings
When multiple styles exist inside a heading use spans and css to achieve the desired result