Default font size Increase font size  |   Decrease font size   |  
Skip to main content

Success Criterion 1.4.8 Visual Presentation: [Level AAA]

This criterion ensures that visually rendered text is presented in such a manner that it can be perceived without its layout interfering with its readability. Text should be displayed without presentational distractions and provide functionality by which the user can control the repesentation in terms of color and size.

Techniques

Allowing users to select text and background colors

Styling, other than text and background color for main content, may be made by the author using CSS. This would include specify colours for secondary content such as banners, navigation bars and menu bars and applying borders. Often the use of colour indicates distinct sections of the page. The user should be gven the opportunity to changethe text and background colours of the main content though.

If the author does not specify any text and background colours it leaves the user agent to provide default colours. The user may still set their own browser defaults. In some cases it might be helpful to provide instructions on how to change the browser defaults. As an alternative a colour picker could be provided to allow the user to select their colours.

Allow user agent to reflow text

When a browser window is narrowed, the flow of the text should remain within its own container. To allow this to open, container widths should be specifed in percentages rather than fixed widths. This avoids the necessity of horizontal scrolling. The following example demonstrates the effect when the browser window is narrowed. Try it!

col1, col2 {float:left; width:45%}
.....
<div id="col1">
"Lorem ipsum dolor sit amet, ..... mollit anim id est laborum. "
</div>
<div id="col2">
"Sed ut perspiciatis unde omnis ...... quo voluptas nulla pariatur?"
</div>

"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"

As an alternative the line length can be set to a value so that a column of text has a maximum width allowing it easier for users with reading or vision disablilities to view the text. This allows text wrapping when the window is narrowed but when widened will not expand text more than the specified width. It is recommended that lines should not exceed 80 characters. Narrow and ewiden the browser window to see how the following example behaves.

main {max-width:75em;}

<div id="main" >
"Lorem ipsum dolor sit amet, ... mollit anim id est laborum."
</div>

"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

Ensuring text is not fully-justified

It makes it more difficult for people with cognitive disabilities when the text has full-justification, that is, it is aligned to both left and right margins, causing varying amounts of white space between words.

CSS can be used to align the text either left or right. If CSS is not used it will align itself by default in HTML to whatever the direction of the language is.

If there are circumstances when the author requires text to be justified for whatever reason, some mechanism must be provided by which the user can un-justify the text.

Providing a minimum line spacing and paragraph spacing

It is recommended to have line spacing within a paragraph of at least a space and a half. Spacing between paragraphs should be at least 1.5 times larger than the line spacing. In the example below the first paragraph uses default settings but the subsequent paragraphs have style rules applied to them.

p.linespacer {line-height:150%;}
p.paraspacer {margin-bottom:2em;}

....

<p>"Lorem ipsum dolor sit amet, ... mollit anim id est laborum."</p>

<p class="linespacer paraspacer" >"Lorem ipsum dolor sit amet, ... mollit anim id est laborum."</p>

<p class="linespacer" > "Lorem ipsum dolor sit amet, ... mollit anim id est laborum."</p>


"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

It is helpful to provide a control (e.g. button) which the user can use to increment the line spacing to enhance their viewing.

Resizing without assistive technology

Techniques specified in SC 1.4.4 can be applied to this criterion such as the use of relative units when specifying font sizes and container widths. When text is re-sized it should re-flow without having to scoll horizontally.

In some cases the author may deliberately layout content which requires horizontal scrolling. In this situation options should be provided so that a switch may be made to view the content with scrolling. If horizonal scrolling cannot be avoided, the the scrolling should only be to access content, it should not be to read a line of text.

Failures

Not specifying one of background or foreground colours

See SC 1.4.3 for an example of this failure.

Using justified text

As stated above, text should not be justified as the varying white space can cause problems for those with cognitive disabilities.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum sit amet pede. Phasellus nec sem id mauris vehicula tincidunt. Morbi ac arcu. Maecenas vehicula velit et orci. Donec ullamcorper porttitor velit. Sed arcu lorem, cursus sit amet, auctor eu, convallis ut, purus. Vivamus imperdiet accumsan nunc. Maecenas pellentesque nunc a libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur pharetra commodo justo. Nulla facilisi. Phasellus nulla lacus, tempor quis, tincidunt ac, rutrum et, mauris.

Top