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(a11y): Increase Windows / Firefox HCM support #6892

Merged
merged 6 commits into from
Sep 24, 2020

Conversation

tw15egan
Copy link
Member

Closes #6859 [Slider]
Closes #6767 [Pagination]
Closes #6471 [Checkbox]
Closes #6862 [Modal]
Closes #6748 [Radio Button]
Closes #6755 [Select]

Adds in Windows and Firefox HCM support. This PR focuses on ensuring all elements are visible, especially icons. Focus issues will be addressed in a separate PR (mainly for the Firefox HCM support, Edge is pretty good).

Changelog

New

HCM changes to the following components

  • Accordion
  • Button
  • Checkbox
  • Data Table
  • Dropdown
  • List Box
  • Modal
  • Overflow Menu
  • Pagination
  • Radio Button
  • Search
  • Select
  • Slider
  • Tooltip

Changed

  • Modified the stylelint package to not throw an error with the unreleased prefers-contrast flag

Testing / Reviewing

On a Windows 10 machine, go to settings --> ease of access --> high contrast and flick the switch. Compare the storybook in Edge (Should be in High Contrast) to Chrome (Should look normal).
For Firefox, you'll need to open it up and type about:config into the address bar. Then, search for layout.css.prefers-contrast and set it to true.

Ensure there are no missing UI elements for the following components:

  • Accordion
  • Button
  • Checkbox
  • Data Table
  • Dropdown
  • List Box
  • Modal
  • Overflow Menu
  • Pagination
  • Radio Button
  • Search
  • Select
  • Slider
  • Tooltip

@netlify
Copy link

netlify bot commented Sep 22, 2020

Deploy preview for carbon-elements ready!

Built with commit e876c58

https://deploy-preview-6892--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Sep 22, 2020

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit e876c58

https://deploy-preview-6892--carbon-components-react.netlify.app

@joshblack
Copy link
Contributor

joshblack commented Sep 23, 2020

@tw15egan would this help out at all as a top-level reset? https://github.com/carbon-design-system/carbon/blob/master/packages/icons/scss/mixins.scss

Not sure if it overlaps or not, just saw that this involved icons and remember that we used that for HCM at some point 🤔 Maybe if we update it to include the prefers-contrast query?

@joshblack
Copy link
Contributor

bump @dakahn when you have a sec to review 👀

@tw15egan
Copy link
Member Author

@joshblack I noticed that, and it looks like we already pull it in via our reset:

Problem is, anywhere we define a fill (that is not currentColor), it takes precedence over this selector. We could slap an !important on there and call it a day though 🤔

Copy link
Contributor

@dakahn dakahn left a comment

Choose a reason for hiding this comment

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

Awesome freakin job! 💪

@joshblack
Copy link
Contributor

@tw15egan ah that makes a ton of sense, thanks for explaining.

@tw15egan
Copy link
Member Author

@joshblack @dakahn do we want to go forward as-is? Or do we want to change it so that mixin takes precedence in HCM with an important!?

@joshblack
Copy link
Contributor

@tw15egan I think going forward as-is works out, maybe we could add a lint rule to stylelint to warn us about this in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment