No Boundaries Logo

Web Accessibility Policy of the State of Maine

Back to Policy Table of Contents

Implementation Guidelines

1. Coding

1.1 - Use valid, standard web programming code.

The World Wide Web Consortium (W3C) sets and publishes standards for most web programming languages, including HTML 4.01, XHTML 1.0, CSS Level 1 & 2, DOM, and SMIL. Programming code is considered "valid" when it follows the all the rules and conventions specified in the published standards.

Screen readers and other assistive technologies can more accurately interpret and interact with web pages that are built using valid, standard code. W3C languages are designed with accessibility in mind. This will also make your site compatible with a wider range of web browsers and devices used by the general public.

Indicate the programming language you are using by starting your code with a document type declaration such as: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">. Use the W3C HTML Validation Service and W3C CSS Validation Service to check your code. Refer to the World Wide Web Consortium site for full specifications and documentation.

Ref: WCAG 3.2, 11.1

1.2 - Use appropriate markup to convey document structure.

HTML includes markup (programming code) to identify the structural elements of a document. For example, the <p> element identifies a paragraph and <h1> identifies a first-level heading.

Screen readers use structural elements to help make reading more efficient. For example, some screen readers can skip from heading to heading to allow the user to "skim" the document.

Identify section heading, paragraphs, lists, quotes, etc using the appropriate tags instead of relying on formatting commands to distinguish these elements. For example, use <h1> tags to identify top-level headings rather than simply applying font-size or bold formatting commands. Do not misuse structural elements for formatting effects, such as using <h1> to make text bold or <blockquote> to indent a paragraph that is not actually a quotation.

Ref: WCAG 3.5, 3.6, 3.7, 5.4

1.3 - Use style sheets for formatting whenever possible.

Cascading Style Sheets (CSS) is a formatting language designed to compliment HTML. While HTML is designed to identify a document's structure, CSS is intended for formatting and presentation. (Pages must be usable and function properly when CSS is not supported. CSS Level 2 is recommended, but it must be backward compatible.)

In general, users can most easily override formatting settings made using CSS. The use of CSS for formatting also tends to facilitate the proper use of HTML to identify document structure.

See the W3C's Cascading Style Sheets site for specifications, tutorials, and resources.

(Note: Some older web browsers, notably Internet Explorer 3 and Netscape 4, have problematic support for CSS. Be sure to test pages using CSS in multiple browsers.)

Ref: WCAG 3.3