Changing context

Changes of context are predictable

When user actions unexpectedly cause a major change to a web page known as a change of context, it can disorient users who aren't able to view the entire page simultaneously or who are easily distracted by changes. Unexpected changes of context impact users with motor impairments, users with low vision who magnify the screen, users who are blind, and users with certain cognitive limitations.

A change of context includes changes of:

User agent
Software that retrieves and presents content, e.g., a Web browser, media player, plug-in or other program including assistive technologies. A completely separate user agent, such as an external viewer programme, opens.
Viewport
Content is rendered in one or more viewports. These include browser windows, browser tabs, frames, loudspeakers, and virtual magnifying glasses. Typically, a new window opens.
Focus
Focus refers to which interactive control on the screen -- a link, form control, button, or custom control -- currently receives input from the keyboard (and from the clipboard when you paste content). The user's focus moves unexpectedly to a different part of the current Web page.
Content that changes the meaning of the Web page
This includes significantly re-arranging the content of a page.

As discussed in the following sections, changes of context must never be triggered on focus, and must be anticipated by the user if triggered by changing the setting of a control (on input).

On focus

Keyboard users navigate from interactive item to interactive item using the Tab key, moving focus from one item to the next. A component that triggers an event when it receives focus must not change the context. For instance, a control that receives focus must not trigger changes in context such as:

  • Causing a form to submit automatically
  • Causing a new window to launch
  • Causing focus to change to another control

The design goal is predictability. Give the user control over changes of context with an explicit user action that's generally understood to cause a change of context; e.g, clicking a link or pressing a submit button.

Related WCAG resources

Related WCAG resources

Success criteria

Techniques

Failures

On input

Changing the setting of a user interface component must not cause a change of context. Examples of changing a setting include checking a checkbox, entering text into a text field, or changing the selected option in a <select> element. Clicking on links or tabs in a tab control is activating the control, not changing the setting of that control.

Again, the design goal is predictability. There are two options:

  • Give the user control over changes of context with an explicit user action that's generally understood to cause a change of context; e.g, clicking a link or pressing a submit button.
  • Describe to the user how interacting with the control changes the context, before the control is encountered.

Related WCAG resources

Related WCAG resources

Success criteria

Techniques

Failures

Back to top