1.3.2 Meaningful Sequence
When you use white space characters to visually format individual words, it can harm accessibility.
This document provides information about the related Acquia Optimize checks:
Using white space characters to control spacing within a word.
White space characters such as spaces, tabs, line breaks, or carriage returns must not be used to visually format individual words.
When you use white space characters like spaces, tabs, line breaks, or carriage returns to visually format individual words, it can harm accessibility. This practice can create challenges for users who rely on screen readers or other assistive technologies, as these tools interpret white space differently than visual users. Instead of seeing a well-formatted word, users may hear unnatural pauses or broken speech, making the content hard to understand. Additionally, this method can cause layout issues on different devices.
This check affects the following users who have:
Visual impairments: Who access the site contents with a screen reader or screen magnification software.
Bridgit is a blind mother to a five-year-old girl and an 11-year-old boy:
"Sometimes it feels like my screen reader gets the hiccups. It is kinda funny, but you know, when they format headings or other text with spaces between the letters to make it look nice for people who can see, it messes things up for me. Instead of reading the words, it is like my screen reader just starts hiccuping out the letters one by one, really fast. I have to concentrate so hard, and it is like I am listening to someone with the worst case of the hiccups!”
This section gives some examples of the issue.
In the example, a song title is formatted by adding spaces between each letter. This means that screen readers, which are often used by people who are blind, will not read the title as words but as a sequence of letters in quick succession. This makes it difficult to understand the meaning.
<h1>B a c k I n B l a c k</h1>
<p>Back in black, I hit the sack</p>
<p>I've been too long, I'm glad to be back</p>
<p>Yes, I'm let loose from the noose</p>
In the example, a visual effect of spacing between the letters is achieved once again. However, because this effect is created with CSS letter-spacing
, it will not interfere with the correct reading by screen readers, for instance.
<h1 style="letter-spacing: 1em;">Back in Black</h1>
<p>Back in black, I hit the sack</p>
<p>I've been too long, I'm glad to be back</p>
<p>Yes, I'm let loose from the noose</p>
The Acquia Optimize platform highlights elements that contain text nodes that are formatted with whitespace characters. To resolve this issue, you should adjust your content to avoid using whitespace characters for visual formatting. Instead, you can use CSS as illustrated in the “Examples” section above.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Wed Oct 30 2024 12:39:55 GMT+0000 (Coordinated Universal Time)