Use horizontal rule HR sparingly
Rule
- Audit: Accessibility
- Standard:
- Level:
- Success Criteria:
- ID:
horizontal-rule
Description
This rule determines <hr/> elements and gives a tip.
Context
The <hr/> element adds extra noise
and can be confusing. For example, VoiceOver reads it as dimmed collapsed on top, horizontal separator
, and Windows Narrator reads it as end of line
.
A better option is to replace <hr/> with <div> and use CSS for styling. Alternatively, aria-hidden="true" or role="presentation" can be applied to the <hr/> element.
The rule passes when there are:
- no
<hr/>elements or <hr/>usearia-hidden="true"orrole="presentation"
Standard
Accessibility, Best Practices