Technique C13:Using named font sizes
Applicability
CSS
This technique relates to:
- 1.4.4: Resize text (Sufficient when used with Ensuring that text containers resize when the text resizes AND using measurements that are relative to other measurements in the content by using one or more of the following techniques: Techniques for relative measurements)
- 1.4.5: Images of Text (Advisory)
- 1.4.8: Visual Presentation (Sufficient when used with G146: Using liquid layout)
- 1.4.9: Images of Text (No Exception) (Advisory)
Description
The objective of this technique is to specify a named font size that expresses the relative font size desired. These values provide hints so that the user agent can choose a font-size relative to the inherited font-size.
Examples
Example 1: Named font sizes in CSS
This example selects a larger font size for strong
elements so that their text will always be larger than the surrounding text, in whatever
context they are used. Assuming that headings and paragraphs use different font sizes,
the emphasized words in this example will each be larger than their surrounding text.
strong {font-size: larger} ... <h1>Letting the <strong>user</strong> control text size</h1> <p>Since only the user can know what size text works for him, it is <strong>very</strong> important to let him configure the text size. …
Other sources
No endorsement implied.
Tests
Procedure
- Check that the value of the CSS property that defines the font size is one of xx-small, xx-small, x-small, small, medium, large, x-large, xx-large, xsmaller, or larger.
Expected Results
- Check #1 is true