disclosure navigation menu #7429
Unanswered
stefanprobst
asked this question in
Q&A
Replies: 1 comment 9 replies
-
@reidbarber did we discuss this use case when working on the disclosure stuff recently? I seem to remember the team being a bit confused about why exactly the disclosure pattern was being used for a menu like case in the w3 aria patterns examples. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
the aria authoring practices guide recommends using the "disclosure" pattern (not the "menu" pattern) for site navigation - see disclosure navigation menu example.
now that a disclosure component has been added to react aria components (and this issue has been closed), it would be very helpful to have a canonical example in the docs (or here in github discussions) how to build this with rac.
compared to the disclosure/accordion example in the docs, a disclosure navigation menu
if disclosure were integrated with popover (similarly to how dialog, menu, select do it), that would already do most of these points i think - but the following does not work currently:
what i tried:
my attempt with hooks: https://stackblitz.com/edit/vitejs-vite-12gdwn?file=src%2FApp.tsx&terminal=dev - problem is that focus does not move into the overlay.
second attempt, without
<Overlay>
portal: https://stackblitz.com/edit/vitejs-vite-dvykb9?file=src%2FApp.tsx&terminal=devthird attempt, also without portal: https://stackblitz.com/edit/vitejs-vite-dhvx7h?file=src%2FApp.tsx&terminal=dev
how do you currently recommend building a "disclosure navigation menu" with rac? thanks!
Beta Was this translation helpful? Give feedback.
All reactions