RGAA 3.0 - Rule 10.4.2
Summary
This test consists in checking wether the font-size property is always defined with a relative unit.
Business description
Criterion
Test
Description
In the style sheets of the website, for the media types screen, tv, handheld, projection, do font sizes use relative units only?
Level
AA
Technical description
Scope
Page
Decision level
Decidable
Algorithm
Selection
Set1
All the css Rules with a “font-size” property, whose media is “screen”, “tv”, “handheld” or “projection”
Process
Test1
Check whether the property “font-size” of the css rules of Set1 use a forbidden unit (pt, pc, mm, cm, in defined in the “RelativeCssUnits” nomenclature).
For each occurence returning true, raise a MessageA
Test2
A messageB is raised indicating that this css have to checked manually
MessageA : Bad Unit type
- code : BadUnitType
- status: Failed
- parameter : css-selector name
- present in source : yes
MessageB : Untested resource
- code : UnTestedResource
- status: Pre-Qualified
- parameter : the resource name
Analysis
Passed
All the “font-size” property of css rules of Set1 are defined with a relative unit (Test1 returns false for all the elements of Set1)
Failed
At least one css-rule of Set1 contains a property “font-size” that uses a non-relative unit (Test1 returns true for at least one ement of Set1)
Pre-Qualified
If a css could not have parsed, and so not tested for any reason AND all the “font-size” property of css rules of Set1 are defined with a relative unit (Test1 returns false for all the elements of Set1)
A messageB is raised indicating that this css have to checked manually.
MessageB : Untested resource
- code : UnTestedResource
- status: Pre-Qualified
- parameter : the resource name