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

Demo selected state bookend #4064

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Demo selected state bookend #4064

wants to merge 2 commits into from

Conversation

taysea
Copy link
Collaborator

@taysea taysea commented Jul 26, 2024

Deploy Preview

What does this PR do?

Demoing how we could use box-shadow for the selected state "bookend" since the background color alone wouldn't have enough contrast with the unselected background color.

Where should the reviewer start?

What testing has been done on this PR?

In addition to the feature you are implementing, have you checked the following:

General UX Checks

  • Small, medium, and large screen sizes
  • Cross-browsers (FireFox, Chrome, and Safari)
  • Light & dark modes
  • All hyperlinks route properly

Accessibility Checks

  • Keyboard interactions
  • Screen reader experience
  • Run WAVE accessibility plugin (Chrome)

Code Quality Checks

  • Console is free of warnings and errors
  • Passes E2E commit checks
  • Visual snapshots are reasonable

How should this be manually tested?

Any background context you want to provide?

What are the relevant issues?

Screenshots (if appropriate)

Screen.Recording.2024-07-26.at.1.42.43.PM.mov
Screen.Recording.2024-07-26.at.1.42.27.PM.mov

Should this PR be mentioned in Design System updates?

Is this change backwards compatible or is it a breaking change?

@oliverHPE
Copy link
Collaborator

Thanks @taysea

To meet the guidelines for minimum contrast as found here: https://www.w3.org/WAI/GL/low-vision-a11y-tf/wiki/Contrast_(Minimum), let's make the width of the shadow 3px. That way the bookend would be considered thick (3 css pixels), and therefore the color contrast minimum would need to be 3 : 1, which the strong selected color is as measured against white.

@taysea
Copy link
Collaborator Author

taysea commented Jul 29, 2024

To meet the guidelines for minimum contrast as found here: https://www.w3.org/WAI/GL/low-vision-a11y-tf/wiki/Contrast_(Minimum), let's make the width of the shadow 3px. That way the bookend would be considered thick (3 css pixels), and therefore the color contrast minimum would need to be 3 : 1, which the strong selected color is as measured against white.

Updated!

Copy link
Collaborator

@oliverHPE oliverHPE left a comment

Choose a reason for hiding this comment

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

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants