Skip to content

[tabs] Respect Pointer Cancellation accessibility guidelines #2006

@davidm-m

Description

@davidm-m

Feature request

Summary

Current behaviour for tabs is to activate as soon as the pointer is pressed. In order to meet WCAG Level A 2.2 this should instead be changed to meet one of the following:

  1. No Down-Event
    a. The down-event of the pointer is not used to execute any part of the function;
  2. Abort or Undo
    a. Completion of the function is on the up-event, and a mechanism is available to abort the function before completion or to undo the function after completion;
  3. Up Reversal
    a. The up-event reverses any outcome of the preceding down-event;
  4. Essential
    a. Completing the function on the down-event is essential.

My recommendation is to go for 1. as other examples do.

Examples in other libraries

Additionally, WCAG provides an example implementation. Observe that in this implementation the only pointer event listened for is onClick, which only fires when the pointer is released.

Motivation

Changing this improves consistency with other components that meet accessibility standards and allows users to recover from accidental clicks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitya11ybreaking changeIntroduces changes that are not backward compatible.component: tabsChanges related to the tabs component.

    Projects

    Status

    Recently completed

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions