Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Contrast and Non-Text Content

Ensure that active user interface components and controls and meaningful graphics are distinguishable by people with moderately low vision.

Low contrast controls are more difficult to perceive, and may be completely missed by people with a visual impairment. Similarly, if a graphic is needed to understand the content or functionality of the webpage then it should be perceivable by people with low vision or other impairments without the need for contrast-enhancing assistive technology.

The visual presentation of the following should have a contrast ratio of at least 3:1 against adjacent color(s):

  • User Interface Components: Visual information required to identify user interface components and states, except for inactive components or where the appearance of the component is determined by the user agent and not modified by the author;

  • Graphical Objects: Parts of graphics required to understand the content, except when a particular presentation of graphics is essential to the information being conveyed.

Example as It Relates to Keyboard Focus Indicators

  • A keyboard user typically uses the Tab key to navigate through interactive elements on a web page—links, buttons, fields for inputting text, etc. When an item has keyboard "focus", it can be activated or manipulated with the keyboard. 

  • A sighted keyboard user must be provided with a visual indicator of the element that currently has keyboard focus. For example a border or outline.

  • Browsers will by default provide a visual border around these elements when they are in focus. Usually a blue border or dotted outline. However the default style may not provide enough color contrast between foreground and background. In other cases the outline may not be visible as the element may have already been styled with a specific border or outline or made invisible.   

  • Apply a keyboard focus outline that has sufficient color contrast against the background by using the following CSS attribute, 

...