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): eliminate duplicate main #4865

Closed

Conversation

asudoh
Copy link
Contributor

@asudoh asudoh commented Dec 12, 2019

This change eliminates duplicated <main> (one from UI shell story) and <div role="main"> (one from the Storybook decorator for all stories) by telling the existence of former to the latter.

This change also does:

  • Defines the color of non-focused state of skip-to-content element, given our a11y test tool cannot detect "shown for screen reader only" element
  • Make focus sentinel point to the main content for better navigation

Refs #3576.

Changelog

Changed

  • Change to eliminate duplicated <main> and <div role="main">
  • Color of non-focused skip-to-content element
  • Change to make focus sentinel point to the main content for better navigation

Testing / Reviewing

Testing should make sure skip-to-content element is not broken. All other changes are of Storybook environment.

This change eliminates duplicated `<main>` (one from UI shell story)
and `<div role="main">` (one from the Storybook decorator for all
stories) by telling the existence of former to the latter.

This change also does:

* Defines the color of non-focused state of skip-to-content element,
  given our a11y test tool cannot detect "shown for screen reader only"
  element
* Make focus sentinel point to the main content for better navigation

Refs carbon-design-system#3576.
@netlify
Copy link

netlify bot commented Dec 12, 2019

Deploy preview for the-carbon-components ready!

Built with commit 373b4ea

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

@netlify
Copy link

netlify bot commented Dec 12, 2019

Deploy preview for carbon-elements ready!

Built with commit 373b4ea

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

@netlify
Copy link

netlify bot commented Dec 12, 2019

Deploy preview for carbon-components-react ready!

Built with commit 373b4ea

https://deploy-preview-4865--carbon-components-react.netlify.com

@abbeyhrt
Copy link
Contributor

Hey @asudoh! I asked Sharon Sniders at IBMa about the violations reported in #3576 and she confirmed that the duplicate main violation and the color contrast violation from DAP do not need to be addressed since they come from our storybook environment or DAP mistakenly sensing SkipToContent when it's not visible! Only the "An element with WAI-ARIA role must be contained within a valid element" violation needs to be resolved and your other PR for UIShell (#4834) should fix that! 😄

@asudoh
Copy link
Contributor Author

asudoh commented Dec 16, 2019

I see thanks @abbeyhrt!

@asudoh asudoh closed this Dec 16, 2019
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.

2 participants