Skip to content
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

Merged
merged 5 commits into from
Dec 16, 2019
Merged

fix(UIshell): adds story for SkipToContent and removes the tabIndex prop requirement #4875

merged 5 commits into from
Dec 16, 2019

Conversation

abbeyhrt
Copy link
Contributor

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 use SkipToContent, the Story Source doesn't provide prop tables or component names for them.

Example from Header Base w/ Navigation, Actions, and SideNav:

Screen Shot 2019-12-13 at 11 19 36 AM

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 the children prop since it seemed to be describing the wrong thing.

Changelog

New

  • UIShell story to illustrate SkipToContent use

Changed

  • A link added to StoryContent so there is something to tab to when SkipToContent is used.
  • Description of 'children' prop

Removed

  • .isRequired from tabIndex proptype check

Testing / Reviewing

Look at the story source for the new UIShell Story "Header Base w/ SkipToContent" and decide if we want this story included!

@abbeyhrt abbeyhrt requested a review from a team as a code owner December 13, 2019 17:29
@ghost ghost requested review from aledavila and emyarod December 13, 2019 17:29
@abbeyhrt abbeyhrt changed the title Fix uishell skiptocontent fix(UIshell): adds story for SkipToContent and removes the tabIndex prop requirement Dec 13, 2019
@netlify
Copy link

netlify bot commented Dec 13, 2019

Deploy preview for the-carbon-components ready!

Built with commit bbc60a7

https://deploy-preview-4875--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Dec 13, 2019

Deploy preview for carbon-components-react failed.

Built with commit bbc60a7

https://app.netlify.com/sites/carbon-components-react/deploys/5df803eb499b9d0008a84fc0

@netlify
Copy link

netlify bot commented Dec 13, 2019

Deploy preview for carbon-elements ready!

Built with commit bbc60a7

https://deploy-preview-4875--carbon-elements.netlify.com

Copy link
Contributor

@aledavila aledavila left a 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.

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 - Thanks @abbeyhrt!

@abbeyhrt
Copy link
Contributor Author

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?

@joshblack
Copy link
Contributor

@asudoh asudoh merged commit ce583c4 into carbon-design-system:master Dec 16, 2019
joshblack pushed a commit to joshblack/carbon that referenced this pull request Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SkipToContent]: no documentation, fails DAP contrast, unnecessary required prop
4 participants