Skip to content

Add underline to high contrast text when prefers-contrast is active #1141

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

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

jason-me
Copy link
Contributor

@jason-me jason-me commented Feb 11, 2025

Adds an underline to high contrast link text in the guide body when prefers-contrast is active as set by the user in their OS settings.

As per previous discussion: #1015 (comment)

image

Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for bitcoin-design-site ready!

Name Link
🔨 Latest commit f315a37
🔍 Latest deploy log https://app.netlify.com/sites/bitcoin-design-site/deploys/67ab5ae9520c6e00085c26c0
😎 Deploy Preview https://deploy-preview-1141--bitcoin-design-site.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.

@jason-me
Copy link
Contributor Author

@GBKS - You mentioned the need for this in a previous thread.

@GBKS GBKS added the Accessibility Issues relating to accessibility. label Feb 11, 2025
@GBKS
Copy link
Contributor

GBKS commented Feb 11, 2025

Awesome, thanks for tackling this one. Just one question, why the 2px thickness instead of 1px?

@jason-me
Copy link
Contributor Author

That was just to make it stand out a bit more for someone who is already using enhanced contrast accessibility settings. 1px should work here too.

Changed to a 1 px thickness and offset for a tighter, cleaner, look and feel.
@jason-me
Copy link
Contributor Author

Here is how it looks with a 1px offset and thickness instead. Went ahead and changed the values in another commit to this PR. Open to any other sugggestions.

Screenshot 2025-02-11 at 8 07 15 AM

@GBKS
Copy link
Contributor

GBKS commented Feb 11, 2025

Thanks, it was actually just a question out of curiosity. I'm happy to go with either option, just let me know which one you think works better.

@jason-me
Copy link
Contributor Author

Let's go with the the second, more subtle approach since it is not required to make it stand out so much.
https://www.w3.org/WAI/WCAG22/Techniques/general/G182.html

Copy link
Contributor

@GBKS GBKS left a comment

Choose a reason for hiding this comment

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

Thank you for taking care of this. Very much appreciate it.

@GBKS GBKS merged commit 575e0ae into BitcoinDesign:master Feb 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues relating to accessibility.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants