horizontal-rule

⌘K
  1. Home
  2. SiteLint
  3. Accessibility Rules
  4. horizontal-rule

horizontal-rule

Print this article

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, 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:

    1. no <hr/> elements or
    2. <hr/> use aria-hidden="true" or role="presentation"

    Standard

    Accessibility, Best Practices

    Was this article helpful to you? No Yes

    How can we help?