-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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: add skip to content on panel and story iframe #11066
Conversation
3c8acc9
to
a4eb39e
Compare
- The intention of this change is to make navigating through storybook more accessible.
a4eb39e
to
5369ac3
Compare
👏 |
Thanks Yann! The idea is pretty cool! I think it's going to be pretty tough for the user to learn new interactions:
The labels do help clarify the behavior but are cumbersome to integrate into the UI. I wonder if we can make the UX more straightforward but keep your intent. 🤔 Have you considered binding the left and right arrow keys? |
Hey @domyen, thanks for the ideas! So first of all I am far from an expert in accessibility, but the main intention is to help the visually impaired to navigate through Storybook more easily. The "skip to main content" flow is pretty common in applications and tabbing through is what people do when using screen readers, so it's easier for them to read a button which says "jump to the story" rather than figure out somehow that if they press the right key it would go to the story. I like the feature of the keybinding, but once the user is in the story, Storybook should not alter a normal interaction such as pressing the right or left keys, because that will be useful when testing that story. I'm tagging @ChrisBAshton @angel1199410 @xurxe because I'm sure they have great feedback about this! |
Can someone more experienced with a11y give some feedback about this? |
@yannbf You said it perfectly! This is very much a normal pattern in terms of screen reader experiences. Some helpful WCAG2.0 documentation: Understanding Success Criterion for Bypass Blocks |
Thank you so much for your feedback @ChrisBAshton @angel1199410! @domyen @shilman given the feedback I'd say this is a good contribution. What can we do to merge this? Let me know and I'll be happy to do some extra effort for this! I think this will break a barrier for visually impaired people. |
Hey @ndelangen this requires more UX work. It's not ready to be merged in this state. Can we get to this post 6.0? Please revert this merge. |
I'll revert this @domyen it's indeed a bit too close to 6.0.0 release and needs a bit more polish, you're right |
Issue: #4667
What I did
I added a SkipToContent component which is only visible once focused, in three occasions:
1 - As soon as the user lands in Storybook and tabs for the first time, it shows a button to go to the selected story in the navigation.
2 - When the user is navigating in the sidepane, and selects a story, the next tab shows a button to go directly to the iframe of the story. It is only presented if the story is selected.
3 - When selecting the iframe of the story, if the user navigates one tab back, it shows a button to go back to the story in the navigation of the sidepane.
I didn't know exactly where to put the SkipToContent component, so please give me a light 😄 , also any comment to improve the implementation is appreciated.
How to test
Run storybook and keep tabing, here's an example of the flow: