-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(UIshell): adds story for SkipToContent and removes the tabIndex prop requirement #4875
fix(UIshell): adds story for SkipToContent and removes the tabIndex prop requirement #4875
Conversation
Deploy preview for the-carbon-components ready! Built with commit bbc60a7 https://deploy-preview-4875--the-carbon-components.netlify.com |
Deploy preview for carbon-components-react failed. Built with commit bbc60a7 https://app.netlify.com/sites/carbon-components-react/deploys/5df803eb499b9d0008a84fc0 |
Deploy preview for carbon-elements ready! Built with commit bbc60a7 |
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.
Yay! You figured it out. A story for it I think is better since we had a hard time finding it in the first place. Just one question is the typeIndex prop changing from required to optional a breaking change ? I don’t think so but just making sure.
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 👍 - Thanks @abbeyhrt!
If it was going from not required to required, it definitely would be but since it shouldn’t affect anybody using tabIndex prop, I think we’re good? @joshblack, what do you think? |
It should be good! I think it falls under: |
Closes #4802
This PR adds a story that more explicitly shows the use of
SkipToContent
. Because we use render props in all of the current stories that useSkipToContent
, the Story Source doesn't provide prop tables or component names for them.Example from Header Base w/ Navigation, Actions, and SideNav:
The new story shows all of the components used and their prop tables and is the only story that shows the code example for SkipToContent.
I'm waiting on confirmation from Sharon Sniders, but I believe the DAP violation related to SKipToContent is coming from when it is not visible and is not present when it is visible so it might not need to be addressed. If it does, #4865 will resolve the DAP violation.
In the comment for the
tabIndex
proptype check, it is described as optional so I removed the.isRequired
from the check and changed the comment for thechildren
prop since it seemed to be describing the wrong thing.Changelog
New
SkipToContent
useChanged
StoryContent
so there is something to tab to whenSkipToContent
is used.Removed
.isRequired
fromtabIndex
proptype checkTesting / Reviewing
Look at the story source for the new UIShell Story "Header Base w/ SkipToContent" and decide if we want this story included!