-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
UI: Add skip to canvas/sidebar links #15740
Conversation
- In order to allow better navigation, the events can't be prevented. - One should be able to navigate from keyboard or voiceover without issues.
- also replace the decorator for a padded layout
Nx Cloud ReportCI ran the following commands for commit 5455df4. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
Nx Cloud ReportWe didn't find any information for the current pull request with the commit 349eb16. Check the Nx Cloud Github Integration documentation for more information. Sent with 💌 from NxCloud. |
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.
Looking great @darleendenno -- there are a couple rendering errors in Chromatic, can you take a look?
@shilman both of these errors are in components using the new |
@darleendenno Chromatic does not officially support |
I see now -- I'll fix it up today. May need a delay or some syntax refactoring. Thanks for catching! |
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.
Great job--looking fantastic! 💯
Thank you!! I have one more thing to fix up with theming per @domyen but I am hoping to have it ready early next week 🙏 |
Super nice @darleendenno! Works great both in normal keyboard navigation as well as with Voice Over 👌 |
Ok this is ready for re-review & merging. Let me know what you think @ghengeveld ❤️ |
I'm having trouble getting the skip to sidebar button to work with keyboard or by clicking on FF Mac latest. Any ideas? |
I’ve been having issues on initial render as well. Refresh and try again. May have to file an issue or get some help figuring out why that’s happening. |
8bcadd1
to
a5c93ac
Compare
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.
IT WORKS! Nice work. I had only one minor suggestion. Thanks for making this happen.
…in navigation (#884) Context Version 6.4 of storybook comes with some improvements in navigation, including "Skip to Canvas" and "Skip to Sidebar" navigation links, enabling keyboard users to skip over the sidebar content. This change was introduced in this PR (storybookjs/storybook#15740) around Skip to X links Resolves github/accessibility#379 Notes 6.4 is still in beta, so this will likely need another bump once 6.4 is fully published. However, we want to bump this version for "Skip to" links to enable our auditors who rely on keyboard to navigate our Primer components more easily.
How can I disable this? For me, it just appears as a 'skip to canvas' button that when clicked moves down 200px and does nothing Edit: // manager-head.html
<style>
.sidebar-header > a {
display: none;
}
</style> |
@callamwilliams |
Here's an example of it happening for us https://covalent.teradata.lol |
@adamnel It looks like one of your custom styles made this button visible all the time: By default, it will not appear unless using keyboard navigation: And both actually do send focus to the canvas. There are not always interactive elements in the canvas, but they do work as expected for folks using keyboard nav. |
+1 I'm seeing the above issue where the "Skip to canvas" button is displaying by default after upgrading to the latest version. |
I have seen this for months also, now I'm on Storybook version
It's especially visible when the sidebar is expanded: sb-jump-to-canvas-button-always-visible.mp4Had to resort fixing it in <style>
/* hide annoying "skip to canvas" button which is rendered over the logo (brand) image */
.sidebar-header > a {
display: none;
}
</style> |
Issue: #4667
What I did
Added three separate links to improve keyboard navigation around Storybook. All links are only visible on keyboard focus.
skipLinkHref
prop to determine when a skip link should renderI also added the option to override theme on a per-story basis via global/parameters
Screenshots
Only using keyboard (TAB and then ENTER) to navigate between the sidebar and iframe
What I did not do
How to test
Questions from the authors (seeking a11y community members for comment)
Shoutouts
Thank you to @smithambera, @yannbf, @MichaelArestad, and @ndelangen for your wise collaboration ❤️