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

Improve readonly input APCA Lc values for a11y #1799

Merged
merged 4 commits into from
Aug 12, 2024

Conversation

qheaden-stack
Copy link
Collaborator

Summary

This PR modifies the font color for readonly inputs to improve their contrast, matching the recommendations by APCA for accessibility friendly contrast values.

Here are before and after screenshots of the readonly input in various color modes:

Before & After for Light Mode:

readonly-input-old-style-light
readonly-input-new-style-light

Before & After for Dark Mode:

readonly-input-old-style-dark
readonly-input-new-style-dark

Before & After For Light Mode High Contrast:

readonly-input-old-style-light-highcontrast
readonly-input-new-style-light-highcontrast

Before & After For Dark Mode High Contrast:

readonly-input-old-style-dark-highcontrast
After for Dark Mode High Contrast:
readonly-input-new-style-dark-highcontrast

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for stacks ready!

Name Link
🔨 Latest commit 9634fa6
🔍 Latest deploy log https://app.netlify.com/sites/stacks/deploys/66b4ca797c5d2e00085edffa
😎 Deploy Preview https://deploy-preview-1799--stacks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@CGuindon CGuindon left a comment

Choose a reason for hiding this comment

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

Tested in the PR env

Copy link
Contributor

@dancormier dancormier left a comment

Choose a reason for hiding this comment

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

This looks good! The tests pass and the text contrast looks good while keeping it differentiated from the writable input. Thanks for making this fix @qheaden-stack!

The only thing I'm curious about is if we should increase the contrast on that lock icon:

20240809-115704

I'm not sure we have any requirements specifically for supplementary icons (WCAG requires a 3:1 ratio for icons I believe, but we don't base our contrast targets on WCAG), but the icon is Lc 27 by APCA's measurement which seems real low.

@CGuindon any thoughts on bumping the lock icon from 300 to 400? Here's the input with the lock at 400 (Lc 69):

image

The 350 stop is also an option if we wanna split the difference (Lc 36):

image

@dancormier
Copy link
Contributor

@CGuindon isn't available today so I'm gonna go ahead and merge this PR, but we can always tweak later if we decide to change the icon color.

@dancormier dancormier merged commit 398e6d2 into develop Aug 12, 2024
11 checks passed
@dancormier dancormier deleted the qheaden/a11y/readonly-input-contrast branch August 12, 2024 18:20
@CGuindon
Copy link
Collaborator

Illustration minimums are 350 — bumping to 400 is fine.

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.

3 participants