Use standard web technologies

HTML, CSS, and JavaScript together provide a stable platform for accessible web content and application development, when these technologies are used following standards. Following standards ensures that assistive technologies and browsers together have the best chance of rendering content in an accessible and meaningful way.

  • Use HTML, CSS, and JavaScript according to specifications. Use HTML’s native markup to identify structure and meaning for content. Use CSS for controlling visual display, including at different screen resolutions and on different environments, such as when the page is printed. Use JavaScript to control interactivity when HTML cannot do this on its own. Valid markup doesn't on its own ensure accessibility, but it's important to minimize validation issues by checking code using a validation tool.
  • Use other web technologies with care, and when appropriate. Other web technologies and document formats, such as Flash and PDF, have varying degrees of support for accessibility, and varying levels of difficulty in providing accessible documents. If you must use an alternative format, ensure you provide all available accessibility features.
  • Test code on a range of assistive technology and browser combinations. As browsers have slight differences in the way they support HTML and CSS features, so do assistive technologies, especially screen readers. As a result, the user experience may vary slightly depending on the interactivity provided and how it was created. As a baseline, test content and functionality using commonly used platforms, for example:
    • On Windows, JAWS with Internet Explorer and with Firefox, and NVDA with Firefox
    • On Mac OS X, VoiceOver with Safari

Testing

Check the HTML with a validation tool.

  • Are all elements tagged and nested properly?
  • Are required attributes provided for an element when used?
  • Are id attributes given unique values?

Resources