Navigation Menu

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

Fix/2901 improve devtools a11y #2947

Merged
merged 3 commits into from Nov 17, 2021

Conversation

Andrewnt219
Copy link
Contributor

@Andrewnt219 Andrewnt219 commented Nov 15, 2021

Closes #2901

Test plan

Devtools is rendered as aside by default
image

Button aria: expanded
image

Button aria: collapsed
image

Hide menuitem when Devtools is closed
image

default element changes to aside from footer because aside
represents a portion of a document whose content is only indirectly
related to the document's main content.
aria-label is also added to replace the text "generic" in a11y tree.
aria-expanded indicates open/closed of the menu
aria-haspopup indicates this is a menu button
aria-controls to link to the menu, also added aria-label on the menu to
label it.

Read more: https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-links.html
This is because the element is just hidden visually, but is still inside
the DOM. The added conditional display only affects the inner container,
which means the animation of opening/closing is reserved.
@vercel
Copy link

vercel bot commented Nov 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tanstack/react-query/FJDfVVLAwrfbYCPeH4qFtGRgbybT
✅ Preview: https://react-query-git-fork-andrewnt219-fix-2901-impro-740304-tanstack.vercel.app

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 672aee5:

Sandbox Source
tannerlinsley/react-query: basic Configuration
tannerlinsley/react-query: basic-typescript Configuration

@Andrewnt219 Andrewnt219 marked this pull request as draft November 15, 2021 06:40
@Andrewnt219 Andrewnt219 marked this pull request as ready for review November 15, 2021 07:01
@codecov
Copy link

codecov bot commented Nov 15, 2021

Codecov Report

Merging #2947 (672aee5) into master (c1ae82b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2947   +/-   ##
=======================================
  Coverage   96.40%   96.40%           
=======================================
  Files          45       45           
  Lines        2227     2228    +1     
  Branches      637      638    +1     
=======================================
+ Hits         2147     2148    +1     
  Misses         77       77           
  Partials        3        3           
Impacted Files Coverage Δ
src/devtools/devtools.tsx 79.08% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1ae82b...672aee5. Read the comment docs.

@TkDodo TkDodo merged commit 16131c3 into TanStack:master Nov 17, 2021
@tannerlinsley
Copy link
Collaborator

🎉 This PR is included in version 3.33.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve aria-tagging of Devtools
3 participants