The text characteristics include aspects such as size, color, font family and relative placement.ĬSS benefits accessibility primarily by separating document structure from presentation. This will allow users to modify, via the user agent, the visual characteristics of the text to meet their requirement. The objective of this technique is to demonstrate how CSS can be used to control the visual presentation of text.
The following examples use the CSS selector and rule set below: Refer to C29: Using a style switcher to provide a conforming alternate version and Understanding Conforming Alternate Versions for more information. This technique can be used in combination with a style switching technique to present a page that is a conforming alternate version for non-conforming content. The working group believes the technique can be useful for Web pages that do not have repetitive content in the hidden text areas. Other screen reader users and accessibility experts don't recommend this as a general technique because the results can be overly chatty and constrain the ability of the experienced screen reader user to control the verbosity. It has proved effective on some Web sites. This technique to hide link text has been advocated by some screen reader users and corporate Web authors. Note that the technique does not use visibility:hidden or display:none properties, since these can have the unintentional effect of hiding the text from assistive technology in addition to preventing on-screen display. This ensures the text does not display on screen but remains accessible to assistive technologies such as screen readers and braille displays. The rule set for the selector places the text to be hidden in a 1-pixel box with overflow hidden, and positions the text outside of the viewport. This technique works by creating a CSS selector to target text that is to be hidden. When information in the surrounding context is needed to interpret the displayed link text, this technique provides a complete description of the link's input function while permitting the less complete text to be displayed. The objective of this technique is to supplement the link text by adding additional text that describes the unique function of the link and styling the additional text so that it is not rendered on the screen by user agents that support CSS. C30: Using CSS to replace text with images of text and providing user interface controls to switch.C29: Using a style switcher to provide a conforming alternate version.C28: Specifying the size of text containers using em units.C27: Making the DOM order match the visual order.C25: Specifying borders and layout in CSS to delineate areas of a Web page while not specifying text and text-background colors.C24: Using percentage values in CSS for container sizes.C23: Specifying text and background colors of secondary content such as banners, features and navigation in CSS while not specifying text and background colors of the main content.C22: Using CSS to control visual presentation of text.C20: Using relative measurements to set column widths so that lines can average 80 characters or less when the browser is resized.C19: Specifying alignment either to the left OR right in CSS.C18: Using CSS margin and padding rules instead of spacer images for layout design.C17: Scaling form elements which contain text.C15: Using CSS to change the presentation of a user interface component when it receives focus.
C9: Using CSS to include decorative images.C8: Using CSS letter-spacing to control spacing within a word.C7: Using CSS to hide a portion of the link text.C6: Positioning content based on structural markup.