Description

Tab key is used to steer the focus into and from the editor.

User Expectations and Popular Behavior

User expects that:

  • when the element preceding the editor is focused, pressing Tab key would focus the editor;
  • when the editor is focused, pressing Tab key would move focus outside the editor.

Steering focus into the editor[1]

If the focusable element directly preceding the editor in the page’s focus order is focused, pressing Tab key MUST move the focus inside the editable area.

If the element directly succeeding the editor in the page’s focus order is focused, pressing Shift+Tab key combination MUST move the focus inside the editable area.

If the editor is outside the current visible area of the page, the editor MUST be scrolled inside the current visible area of the page.

When the focus is moved inside the editable area, the previous selection state, if it exists, MUST be restored.

Steering focus away from the editor[1]

If the editable area is focused, pressing Tab key MUST move the focus to the focusable element directly succeeding the editor in the page’s focus order.

If the editable area is focused, pressing Shift+Tab key combination MUST move the focus to the focusable element directly preceding the editor in the page’s focus order.

When the focus is about to be moved away from the editable area, the current selection state MUST be saved to be restored when the editable area regains focus.

Notes

  • The overwriting of the default behavior of the Tab key and the Shift+Tab key combination, defined above, in certain features is possible, however accessibility issues SHOULD be taken into consideration.

References

  1. The description of Rich Text Editor use case in WAI-ARIA 1.0 Authoring Practices.