Coding accessibility principles

Web accessibility is the ability for a person with a disability to understand and use a web site, application, intranet, or program. It allows people with disabilities to access information like anyone else; interact with others without being classed as “disabled” and allows them to undertake activities which they may not otherwise be able to do.

Accessible website code is important to people with the following disabilities:

  • Blindness
  • Colour-blindness
  • Low vision
  • Deafness
  • Motor impairments
  • Cognitive impairments.

WCAG 2.0 is a cooperatively developed shared standard for best-practice HTML coding. It was developed for web content and authoring development, to meet the accessibility needs of people with a disability and older people with changing abilities due to aging.

The benefits to people with a disability include:

  • Access to all content.
  • Content that can be presented in different ways without losing meaning.
  • Interaction with web content through user agents and assistive technologies that is reliable and accurate.

The benefits to web content and authoring developers include:

  • A common definition for accessible content.
  • A technical standard that is adaptable and flexible, and technology-neutral.

Accessibility principles specific to coding include, but are not limited to:

  • All non-text content has a text equivalent
    • Visual information should have a text equivalent.
    • Interactive content and form components should have a descriptive label.
  • Information and structure can be programmatically determined
    • Content structures are marked-up correctly.
    • Information or instruction sequences do not rely on presentation alone.
    • Markup is not used incorrectly as method for the presentation of content.
  • Text can be resized
    • Text can be resized to 200 per cent without loss of content or functionality.
  • Web pages should be keyboard accessible
    • Avoid keyboard traps.
    • Ensure that all content can be accessed with the keyboard alone and the keyboard focus indicator is visible and clear.
  • Text does not move, blink or scroll
    • For moving, blinking, scrolling, or auto-updating information functionality to pause, stop, hide is provided.
  • Content should not trigger seizures
    • The general and red flash thresholds are observed to prevent seizures.
  • Provide mechanisms to help people find information
    • More than one way should be provided for information to be found (e.g. a search feature).
    • A logical keyboard focus order is maintained that matches the visual page order.
  • Text should be readable and understandable
    • The default language of the page is specified.
  • Web pages should appear and operate in predictable ways
    • Similar content, components and functionality should be presented consistently.
  • Web pages should be compatible with technologies
    • The document type is declared with a single DOCTYPE specified.