Headings should contain text*
Error Report
Headings should contain text.
What Is A Heading?
A heading is a title for a section of text that, when correctly formatted, can be used to create electronically generated outlines (via tools like HTML5 Outliner Links to an external site. and HeadingsMap Links to an external site.) and be used to more easily navigate the webpage (via keyboard commands in a text-to-speech or screen reader Links to an external site. program commonly used by visually impaired persons). For more on correctly formatting headings, see Avoid using styles for document structure.
Why Is This Important?
If a heading has no text, there are three problems that can arise. All of these problems stem from the fact that you cannot see the empty heading. If the heading has text you may be able to better determine if the heading belongs in the webpage or should be deleted.
Cause Of Error
To get this error, you usually have created a heading via the Paragraph drop menu but either:
- Forgot to add text.
- Deleted the text, but not the line.
- Moved an entire section, including the title, and the heading format was left behind.
- Placed the cursor at the start of the heading and created a new line.
UDOIT recognizes this issue because the heading is coded in a way that is similar to one of the following formats:
<h4>[no text here]</h4>
<h2><strong>[no text here]</strong></h2>
<h3><span style="font-size: x-large; color: #ee0000;">[no text here]</span></h3>
<h4 style="font-weight: bold;">[no text here]</h4>
<h2><img src="https://source/8399" alt="[no text here]" width="240" height="230"></h2>
False Negative
If your heading contains a space or the Unicode
, UDOIT will not recognize the heading as being empty. It is not common for an empty--or in this case invisible--heading to only contain a space, but if it happens to you, this is why UDOIT has not flagged it.
How To Fix It
Related Result Pages
Related Standards
- WCAG 2.0 A and AA Reference Guide Links to an external site.
- WCAG 1.3.1: Info and Relationships Links to an external site.
- WCAG 1.3.1 H42: Using h1-h6 to identify headings Links to an external site.
- WCAG 1.3.2: Meaningful Sequence Links to an external site.
- WCAG 2.4.6: Headings and Labels Links to an external site.
Last Updated January 2017.
Clemson Online