-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Story Hierarchy - keyboard accessibility #1427
Conversation
Codecov Report
@@ Coverage Diff @@
## release/3.2 #1427 +/- ##
================================================
+ Coverage 8.89% 20.36% +11.46%
================================================
Files 242 236 -6
Lines 5193 5137 -56
Branches 660 693 +33
================================================
+ Hits 462 1046 +584
+ Misses 4149 3570 -579
+ Partials 582 521 -61
Continue to review full report at Codecov.
|
@igor-dv it's cool! but did you consider to improve the existing a bit more details about what I mean: #981 PR introduces one more UI API for jumping to next/prev storyKind I guess we can use it with hierarchy as well just need to add keyboard shortcuts advantage: after merging it we can use the same way of navigation both by keyboard and by touch screen on mobile devices /cc @shilman |
@usulpro - Great feature, would like to see it live ! What I tried to do here is to support the previous stories functionality - basic navigation with I will try to improve the existing What BTW prevents #981 from being merged ? |
Good point 👍
I'm just not sure is it intentional feature or "side effect". I know some people don't like this blue frames #1293 Maybe somebody could clarify? related to #981 I guess I need to find some time to fix the issues requested by review (and maybe it needs one more review as well) |
Yep, this blue box is not a big art =) But it could be styled appropriately (thinner and not blue for example) |
Review will be appreciated =) |
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.
looks good, thanks for adding a11y
} | ||
HeaderDecorator.propTypes = { | ||
style: PropTypes.shape({ | ||
title: PropTypes.object, |
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.
these things inside the shape should probably all be .isRequired
from the looks of how they're used.
base: PropTypes.object, | ||
}).isRequired, | ||
node: PropTypes.shape({ | ||
name: PropTypes.string, |
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.
looks like node.type
and .children
could be checked as well
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.
@igor-dv this is really great!!! going the extra mile!
Issue: #151
What I did
I've added accessibility support to the stories tree.
Next Steps
Support arrow keys to navigate on tree
How to test
run
cra-kitchen-sink
and presstab
,shit + tab
andenter
(or any other OS alternative =/ ) when focus is on the tree.