-
Notifications
You must be signed in to change notification settings - Fork 164
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
Ensure sidenav is only tabable when in view #4371
Ensure sidenav is only tabable when in view #4371
Conversation
Demo starting at https://vanilla-framework-4371.demos.haus |
I wonder if we should do it another way around. Keep the side navigation focusable, but make sure it shows up on the screen when it's focused? Not sure which one would be a better accessibility practice. |
If it helps, I would expect it to be a well labelled (using |
We will discuss in the Accessibility guild to get some more opinions before moving forward |
@bartaz we talked about it in the guild meeting after you left (I promise we weren't waiting for you to leave so we could make decisions without you 😉 ) We thought it's a better experience if the user makes the decision to open the nav or not - they could be tabbing through the page to get to something further down the page, and it'd be frustrating if they first have to open then close the navigation. The demo seems to work well, and Beth mentioned she'd update it so that (as Ant mentioned) focus is set to the first item when it's opened, and returned to the CTA when it's closed. |
06792b8
to
99fb6d7
Compare
I've updated the PR to ensure the focus lands on the CTA/first element in the side nav. I couldn't decide, when the drawer opens, whether the focus should land on the first element (which is the toggle side navigation button) or the "Get started" list item, what do you think @sowasred2012 @bartaz? |
I think that's spot on! |
Something strange is happening when tabbing. Interestingly when the focus is "away" hitting Enter opens the navigation. So it seems after tabbing out of "Toggle button" the focus is still on it? Or focus moves to "Toggle button" inside the navigation? |
@bartaz Ahh yes I forgot about this little bug, I'll need to remove the tab focus from the button as well as all the links |
Would be nice to have ESC button close the side nav as well. |
templates/docs/examples/patterns/side-navigation/_toggle_script.js
Outdated
Show resolved
Hide resolved
templates/docs/examples/patterns/side-navigation/_toggle_script.js
Outdated
Show resolved
Hide resolved
templates/docs/examples/patterns/side-navigation/_toggle_script.js
Outdated
Show resolved
Hide resolved
I'm a few steps closer to the end! The reason Also, there is a lot of js missing in the Could you give it a QA @bartaz |
fb82f1f
to
a453692
Compare
With new class name added and other renamed we should update the docs. "Class reference" and "Javascript Functionaliy" sections need to be updated with new class names. We should add information about deprecated class names to "What's new" page and maybe in "Class reference" as well? |
Co-authored-by: Bartek Szopka <bartaz@users.noreply.github.com>
fc8d08f
to
56201f1
Compare
56201f1
to
b781817
Compare
@bartaz I've updated the class names in the javascript section and the class reference table. I've also added a notification at the bottom of the class reference mentioning the deprecated class names. As I am updating the what's new table in the other PR I will add this there as not to cause more conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, lets get this thing merged! 🍾 🎆 🎉
Done
Fixes #4134
QA
Check if PR is ready for release
If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:
Feature 🎁
,Breaking Change 💣
,Bug 🐛
,Documentation 📝
,Maintenance 🔨
.package.json
should be updated relative to the most recent release, following semver convention: