Avoid italic text on long content

Description

Rule ID: font-style-italic

This rule verifies if there is defined font-style type italic for a text with length more than 80 characters.

    Why is there a limit of 80 characters for italic text?

    The limit of 80 characters for italic text is a guideline to ensure that long sections of text are not overwhelming to readers. It’s recommended to use italics sparingly and only for emphasis, as excessive use can make the text difficult to read. Additionally, some screen readers may have difficulty with long sections of italic text, so it’s best to use other stylistic elements to highlight important content.

    WCAG Understanding Guideline 3.1 includes an advisory technique for avoiding chunks of italic text. Similarly, WebAIM advises as follows: Do not use italics or bold on long sections of text, but at the same time, use various stylistic elements (italics, bold, color, brief animation, or differently-styled content) to highlight important content.

    This rule checks 2 cases:

    • Determine a reasonable text length: it should be less than 80 characters.
    • Determine if element has defined font-style type italic.

    How do screen readers handle long sections of italic text? What are some alternatives for emphasis?

    Screen readers may have difficulty with long sections of italic text, so it’s best to use other stylistic elements to highlight important content. Some alternatives for emphasis include using bold text, changing the font size or color, or adding brief animations or differently-styled content.

    How to fix it

    The rule passes when specified element contains text with a length of more than 80 characters and has no defined style font-style type italic.

    Standard

    SiteLint, Accessibility, Best Practices