Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interactive controls are not nested [#3517] #3802

Closed
wants to merge 1 commit into from

Conversation

olets
Copy link
Contributor

@olets olets commented Apr 18, 2024

Fixes #3517

Before

Sidebar items group's headings are focusable, and so are their child carets. The focusable child carets are an accessibility problem (as described in the linked issue) and add no value (focusing and clicking on the caret has the same effect as focusing and clicking on the heading).

After

Collapsible sidebar items' caret not focusable. Clicking on caret still toggles the group, because a click on caret is a click on the group heading.

Testing

  1. On a Vitepress site using the released version, on any page with a collapsible sidebar item group
    • use the keyboard Tab key to navigate to the collapsible group's header. Note that the focus ring contains the caret. Type Enter and Confirm that the group toggles.
    • Advance one more Tab stop to select the caret. Type Enter and Confirm that the group toggles.
    • Use the mouse to click on the caret. Confirm that it toggles the group.
  2. On that page, run axe DevTools. Confirm the error described in the linked issue
  3. Repeat on this branch.
    • Confirm that the error is gone
    • Confirm that the group header can be focused with the keyboard
    • Confirm that Enter when the group header is focused toggles the group
    • Confirm that clicking the caret with the mouse toggles the group

Makes sidebar item group toggle's caret not focusable.
Clicking on caret still toggles the group.
@brc-dd
Copy link
Member

brc-dd commented Apr 26, 2024

superseded by #3806

@brc-dd brc-dd closed this Apr 26, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

accessibility: interactive controls should not be nested
2 participants