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

Accessibility contrast bug on "our work" page with Chrome #3796

Closed
1 task
LindsayYoung opened this issue Jan 8, 2024 · 8 comments · Fixed by #3805
Closed
1 task

Accessibility contrast bug on "our work" page with Chrome #3796

LindsayYoung opened this issue Jan 8, 2024 · 8 comments · Fixed by #3805
Assignees
Labels

Comments

@LindsayYoung
Copy link
Member

Expected Behavior

Contrasting colors on the "get in touch" button at this url: https://18f.gsa.gov/our-work/

Actual Behavior

This is my screen shot using chrome:
Screenshot 2024-01-08 at 3 14 40 PM

Steps to reproduce the behavior

I only get this issue with Chrome, it looks correct in Safari.
I tried clearing my cache and re-launching Chrome, but the issue persists for me. I don't see any errors in the inspector on page load.
It is possible it's just something weird locally for me, feel free to close the issue if you can't reproduce it. I wanted to file an issue just in case this is also happening to others.

This issue is done when

  • Contrasting colors load for chrome users

Thank you!!

@juliaklindpaintner
Copy link
Member

Seems to be an issue with the "followed link" color.

@dluetger
Copy link
Contributor

dluetger commented Feb 5, 2024

I can certainly look, but offhand to we know if this is a Design System issue or local only to this page? And if so, should we prioritize a quick-local fix first?

@dluetger
Copy link
Contributor

dluetger commented Feb 5, 2024

.usa-section--dark a:visited { color: #dfe1e2; }

Thinking aloud as I investigate. The link is classed like it's on a dark background (it doesn't seem to know it's on a light button); so that's a thing. I'll look into how widespread that is or if it just needs an additional class

@dluetger
Copy link
Contributor

dluetger commented Feb 5, 2024

It also isn't a button at all, at least in code, and this seems like one of those semantic edge cases

@dluetger dluetger self-assigned this Feb 6, 2024
@dluetger
Copy link
Contributor

dluetger commented Feb 7, 2024

Scratch that, it is a usa-button but is still getting the visiting link style applied like I said two comments up. I also replicated this in Safari

@dluetger
Copy link
Contributor

dluetger commented Feb 7, 2024

Same issue also happens on the homepage in the "What 18F can do" and "Recent blog posts" sections, so I suspect any buttons on dark backgrounds would see this effect

@dluetger
Copy link
Contributor

dluetger commented Feb 7, 2024

So for this site, it seems we implemented an 18F specific button class, an18f-button--accent, that has slightly different rules from usa-button. an18f-button--accent seems to be used exclusively for these dark background sections and has the light blue background color. It seems, though, for both button styles, the intent is for it to not change color at all once visited. There seems to be a cascade error for the 18F one though and it's getting USWDS' style of any visited link on a dark background instead of the intended, unchanged, color.

@dluetger
Copy link
Contributor

dluetger commented Feb 7, 2024

So, I thiiiink the source of the error is somewhere in ...assets/css/_components/button.scss; where there is a missing :visited state that needs to be copied and pasted down, but could use another set of eyes to verify that
Screenshot 2024-02-06 at 4 33 31 PM

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

Successfully merging a pull request may close this issue.

4 participants