SIA-R71Paragraphs of text are not justified
Accessibility requirements
This rule tests conformance of the following accessibility requirements:
Description
This rule checks that paragraphs of text are not justified.
Applicability
This rule applies to every element that has a semantic role of paragraph
and is visible.
Expectations
- The element does not have a computed
text-align
ofjustify
.
Assumptions
This rule makes the following assumptions:
-
Elements with a role of
paragraph
are used for blocks of text. -
No mechanism is available to left or right align the text.
Accessibility support
This rule has no known accessibility support concerns.
Examples
Passed
This paragraph of text is left aligned and therefore passes the rule:
<style>
p {
text-align: left;
}
</style>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas nec diam
ullamcorper, cursus nulla non, congue purus. Cras vehicula risus lacus, ac
placerat diam vestibulum a. Maecenas lobortis enim interdum nisl vehicula
eleifend. Sed et velit nulla.
</p>
Failed
This paragraph of text is justified and therefore fails the rule:
<style>
p {
text-align: justify;
}
</style>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas nec diam
ullamcorper, cursus nulla non, congue purus. Cras vehicula risus lacus, ac
placerat diam vestibulum a. Maecenas lobortis enim interdum nisl vehicula
eleifend. Sed et velit nulla.
</p>
Inapplicable
This paragraph of text is hidden and is therefore inapplicable:
<p hidden>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas nec diam
ullamcorper, cursus nulla non, congue purus. Cras vehicula risus lacus, ac
placerat diam vestibulum a. Maecenas lobortis enim interdum nisl vehicula
eleifend. Sed et velit nulla.
</p>