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

Feat: Prevent focus on hidden sidebar #2265

Merged
merged 3 commits into from
Nov 16, 2023
Merged

Conversation

jhildenbiddle
Copy link
Member

Summary

See title and original issue (below).

Related issue, if any:

#2225

What kind of change does this PR introduce?

Feature

For any code change,

  • No documentation changes required
  • No automated tests required

Does this PR introduce a breaking change?

No

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

@vercel
Copy link

vercel bot commented Oct 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2023 4:03pm

Copy link
Member

@trusktr trusktr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Can it be tested?

@jhildenbiddle
Copy link
Member Author

jhildenbiddle commented Oct 22, 2023

Nice! Can it be tested?

Technically speaking, yes we can test this. I'd prefer not to implement those tests with this PR for a few reasons:

  1. Elements that are hidden not being unable to receive focus has been in the spec and reliable across browsers for ages.
  2. The current sidebar implementation is kinda wonky and will require mores tests than if it was implemented properly. See Feat: Add aria attributes to sidebar toggle button and current page link #2254 (comment) for details.
  3. Since there is talk of refactoring/updating our method of rending HTML elements, I was hoping to postpone writing additional tests until this work begins.

I'd like to avoid this simple fix turning into a "test all the sidebar things" rabbit hole since it is (IMHO) a pretty basic fix.

@jhildenbiddle jhildenbiddle marked this pull request as ready for review November 2, 2023 16:06
@jhildenbiddle jhildenbiddle requested review from a team and trusktr November 2, 2023 16:06
@jhildenbiddle jhildenbiddle linked an issue Nov 16, 2023 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessibility - hidden anchors are still tabbable
4 participants