Language selection

Requirements

The following summarizes selected techniques from the Web Content Accessibilitylines (WCAG) 2.0 for satisfying the most common applicable success criteria related to this topic.Additional WCAG 2.0 success criteria, techniques, and failures not listed here may also be applicable depending on the content.

Text is combinations of characters on a web page that can be read with the purpose of receiving an informative message.

Colour contrast

Colour contrast is a ratio calculated using a text's foreground colour against its background colour with free software tools.

Note: A point of text is a fixed unit of measurement equivalent to 1/72 of an inch, while pixels is a variable unit of measurement that changes according to a user's screen resolution.

A heading is a short text phrase which identifies the section of content that immediately follows it. Heading elements are <h1>-<h6>.

When using headings:

  • Identify heading text using heading elements (<h1>-<h6>).

    • Start at heading element <h1> (recommended).
    • Don't skip heading element levels (e.g <h2>, <h4>) (recommended).
  • Use descriptive text to identify and differentiate the contents of its section from other content on the web page.

Important: Enlarge non-heading text using only CSS. Do not use heading elements.

A link is a type of UI control that performs one or more of the following behaviours:

  • Takes the user to another web page
  • Jumps to another location within the same web page
  • Performs specialized UI functionality determined by client side scripting (JavaScript)

The link element is <a>

Link text

Provide link text inside either the:

Ensure independent context of link text. Additional context can be established using either:

Use consistent link text for all links which perform the same function.

Note: Independent context means that the purpose of the link can be determined from the link text alone or other elements with a programmatically determinable relationship with the link.

Repeated navigation links

When a group of links are repeated on multiple web pages:

Finding web pages

When establishing navigation on a web site, provide either a:

Important: Links have additional requirements because they are a type of UI control.

An image is a static two dimensional visual artifact that is a type of non-text content.

The image element is <img>.

Describing images

Description text

All images require a text description which serves the same purpose and presents the same information as the image including all:

A description can be empty if the image provides all of the following:

  • No information
  • No functionality
  • Asthetic purpose only

Description length

For descriptions which are:

Description coding

Short text descriptions must be coded in the alt attribute of the <img> element.

Long text descriptions can be coded anywhere (either on the current page or another page) and must either:

Images of text

Use CSS to customize text presentation.

Do not use images of text unless a particular presentation of text is essential to the information being conveyed.

Animated images

Animated images are considered the same as video-only content and the requirements for video-only content apply.

Related to success criteria

A quotation is a strict repetition of an expression re-produced in the natural human language it was originally delivered.

Quotation elements are <q> and <blockquote>.

When using quotations and the length is:

  • Short (no paragraph breaks), use the <q> element.

    • Quotations marks (", ̋, ̏) are coded outside the <q> element
  • Long (with paragraph breaks), use the <blockquote> element.

    • Quotations marks (", ̋, ̏) are coded inside the <blockquote> element

Related to success criteria

When coding web pages, specify the natural human language of content by setting a:

When using the lang attribute, use:

  • en for English
  • fr for French
  • These codes for other languages (see 639-1 column)

Related to success criteria

When using page titles:

Note: It is sufficent for a web application to use only its web application title on all of its web screens.

A form contains a set of form elements, which are UI controls that accepts input.

Form elements are <button>, <input>, <select>, and <textarea>.

Labels and Instructions

Associate form elements to labels by setting either its:

Use consistent label text for all form elements which perform the same function.

Describe form elements purposes clearly with descriptive label text.

Provide clear instructions (with examples, if applicable) identifying form elements requiring:

Supplement colour instructions with symbols or text. (e.g. identifying required fields)

Error messages

When providing error messages:

  • Identify the form(s) element affected.

  • Explain the error and, if applicable, how to fix it for:

Note: For optimal use, it is recommended that error messages appear at the top of the form (when they are server generated).

Session time limits

When a time limit is present, a user must be able to either:

  • Turn off the time limit.

  • Adjust the time limit by extending incrementally up to at least ten times the length of the default setting, ensuring:

    • Prompting the user, on each occurence, to adjust the time limit at least 20 seconds before the time expires.

Turning off or adjusting the time limit is not required when the time limit is either:

  • Real-time (e.g. auctions)

  • Essential to the activity and extending it would invalidate the activity (e.g. exams)

  • 20 hours or more in length

Legal committments and financial transactions

When legal committments or financial transactions occur as a result of a user submission, a user must be able to either:

  • Reverse the submission (or recover the original data)

    • Time limits on the reversal are permitted provided it is stated on the form.
  • Review and correct input before finalizing the submission.

  • Confirm their intent to finalize the submission.

Important: Form elements have additional requirements because they are a type of UI control.

UI controls are elements that can perform an action (or "do something").

UI controls are links and form elements by default. However scripting can transform any element into a UI control.

Appearance

Without colour, UI controls (specifically links) must be visually evident (e.g. text decoration or using layout).

Focus and input

Focus exclusively activates a UI control for use by the user. Losing focus deactivates the UI control.

Input occurs when a user changes the value of the active UI control by interacting with it.

When using UI controls with a keyboard,

  • Changing focus is always available to the user (no trapping).
  • Receiving focus is always available for all UI controls.
  • A visual focus indicator is exclusively visible on the active UI control.
  • The order that UI controls receive focus reflects the intended flow, meaning, and operation of the page.
  • Page context must not change when a UI control receives focus or input.

Note: By default, HTML UI controls which have not been modified by JavaScript will satisfy focus and input requirements.

Event handlers (JavaScript)

Event handlers are special methods executed in JavaScript when a user activates or interacts with an UI control.

When using JavaScript, event handlers must be:

  • Independent (onFocus, onBlur, onSelect, onChange, and onClick)

A table is a mechanism for dividing tabular data into rows and columns.

Table elements are <table>, <th>, <td>.

Additional related table elements include <caption>, <thead>, <tbody>, <tfoot>, <col>, and <colgroup>

Notice: The summary attribute is deprecated in HTML5, see alternatives: https://www.w3.org/TR/html5/tabular-data.html#table-descriptions-techniques

When using tables:

Note: A simple table is one where all cells span exactly one row and one column, and all <th> header cells appear in the first row and/or column.

Date modified: