Closed xNS5 closed 1 day ago
For the desktop navbar, the dropdown menu is less of a navigation menu, which may be a good reason to switch back to the shadcn component.
Haha, well, I totally forgot why I avoided the shadcn component in the first place: there isn't a way to add a focus ring around the trigger element itself. I'll start researching other components in the meantime.
Added additional functionality to close the mobile navbar when clicking a main link, or when clicking a link in a dropdown element.
Next step is going to be to run an accessibility audit on the navbar itself.
The new navbar component is messing up the tabindex order because it's being rendered at the bottom of the DOM. I'll need to hand-roll my own focus trap to ensure that it's navigable right off the bat.
The issue isn't that it's getting rendered at the bottom of the DOM, it's that it's rendered.at the bottom of the DOM and isn't trapping focus.
The lack of focus trapping is the primary issue -- not where the elements are being rendered.
In other news, I'm close to being done with the navbar, I think. The mobile and desktop navbars need some small tweaks, namely with tab behavior in the nav menu component and accordion component. With the desktop view, the menu uses arrow keys + tabs to navigate the child elements. With the Accordion, it just uses tabs. Ideally I'd like to use one or the other to unify the user experience.
Finished running over the navbar with the screen reader. There's a bit of weirdness with the mobile view accordion, but I think it's fine for now. The user can still use tabs to interact with it.
TODO: