Skip to content

Toggle control: visual order should match DOM order #10868

Closed

Description

@afercia

Describe the bug
Splitting this out form #10552 (comment)

Now that the toggle control is displayed before its label, I'd like to propose to make the visual order match the DOM order as required form the WCAG. Checkboxes should always come first and be followed by their labels in the DOM order.

The toggle control wrong order is a long standing issue and already existed before #10552. The visual order change gives now the opportunity to finally fix the DOM order too.

Worth reminding changing the visual order with the flexbox order property is not ideal because visual order and DOM order don't match (see WCAG), see also https://www.w3.org/TR/css-flexbox-1/#order-accessibility

References:
https://www.w3.org/TR/WCAG21/#meaningful-sequence
https://www.w3.org/TR/WCAG21/#focus-order
https://www.w3.org/TR/WCAG20-TECHS/C27.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Focus] Accessibility (a11y)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions