digital media access group

...excellent accessibility research and consultancy

home >  

This is a archived version of the DMAG website, but the information remains for reference. Please visit the new website for updated information.

CSS-related Accessibility Problems

By Nicola McIlroy, published 22nd March 2004.


In the majority of cases, use of CSS should improve accessibility through improvements to presentation and layout; however, misuse can result in some significant accessibility problems.


The main accessibility problem caused by CSS occurs when style sheets are used incorrectly along with non-semantic HTML elements as a substitute for proper structured markup [1]. This causes a number of accessibility issues:

Use of CSS elements that cannot be overridden by a user's own personal style sheet can cause accessibility and usability problems. Declaration of style sheet properties as !important, may prevent the user from making essential changes to that the display of Web pages.

A downside to CSS is cross browser and cross platform support, particularly for CSS positional properties such as 'float'. CSS-based pages may look terrible in some older browsers, such as version 4 of the Netscape browser, where information may actually be obscured or missing. This is why the WCAG specifies that web pages must be accessible when styles aren't available or when they are turned off [4]. Lack of support amongst older browsers should not prevent developers using CSS to improve accessibility - instead the key is to make sure that information can be accessed in these older browsers, even if pages may not look too pretty [3].


And using CSS still requires you to be careful when specifying text and background colours, to avoid low-contrast or problematic colour schemes. Using CSS to alter the appearance of text can introduce specific usability problems - we've seen sites that use CSS hover properties for hyperlinks that result in the link text 'disappearing' due to a complete lack of contrast with the background, or links where the text size changes unexpectedly when the mouse pointer is moved over them!


Conclusion

The introduction of Cascading Style Sheets to control formatting and display can certainly enhance the accessibility and usability of web pages, but only when accessibility and usability are properly considered during design.. Correct implementation of CSS depends on proper application of structurally sound HTML.


For design tips on what to do and what not to do when using CSS, take a look at these sites:


References

  1. MCU - CSS accessibility problems: is markupdead? ( http://www.mcu.org.uk/articles/cssaccessproblems)
  2. Re: CSS accessibility problems: is markupdead? (http://lists.w3.org/Archives/Public/w3c/w3cwai-ig/2002AprJun/0410.html
  3. Alabama Technologies - (http://www.alabamatechnologies.com/resources/css-03.asp)
  4. Web Content Accessibility Guidelines (WCAG): Checkpoint 6.1 Organise documents so that they may be read without style sheets.