Skip to content

guides: fix contradictory claims about Safari's accent-color support#900

Open
atopal wants to merge 1 commit into
mainfrom
fix-accent-color-safari-contradiction
Open

guides: fix contradictory claims about Safari's accent-color support#900
atopal wants to merge 1 commit into
mainfrom
fix-accent-color-safari-contradiction

Conversation

@atopal

@atopal atopal commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

In features/accent-color.md, Safari was mentioned twice with opposing claims about how it handles contrast. Replaced the first mention of Safari with Firefox to correctly reflect browser behaviors.

Closes #882

In features/accent-color.md, Safari was mentioned twice with opposing
claims about how it handles contrast. Replaced the first mention of
Safari with Firefox to correctly reflect browser behaviors.

Closes #882

TAG=agy
CONV=d80997ee-2d19-4422-a1de-ef4e36c342f9
@atopal atopal requested a review from rviscomi June 1, 2026 16:41
@atopal atopal requested review from micahjo7 and paulirish as code owners June 1, 2026 16:41
Comment thread features/accent-color.md
## Issues

- When placing visual elements over the accent color (e.g. a checkbox checkmark), Chrome and Safari will automatically select a contrasting color, whereas Safari will modify the accent color, and may not maintain adequate contrast.
- When placing visual elements over the accent color (e.g. a checkbox checkmark), Chrome and Firefox will automatically select a contrasting color, whereas Safari will modify the accent color, and may not maintain adequate contrast.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The Safari issue linked from BCD appears to have been fixed: https://bugs.webkit.org/show_bug.cgi?id=244233

There's a similar issue for Chrome on Android that's actually still open: https://issues.chromium.org/issues/343503163

Is there a better way to say that older versions of Safari had a known contrast issue, while Chrome on Android still does?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was confused, because the Safari implementation doesn't match other browsers. Instead of changing the indicator color (checkbox from white to black or vice versa) it changes the luminance of the accent color, so certain accent colors are simply not possible, like white in light mode. That's what the text pretty much says (minus the doubled Safari confusion), but it also claims that that would lead to contrast issues.

The webkit issue seems to be only concerned with iOS where the above didn't actually happen until recently, hence why the report says that on iOS you get white indicator on white background, while desktop does white indicator on dark grey background (and all other browsers switch the indicator color instead).

Now, I'm not sure what exactly the PR that solves that issue in Safari on iOS actually changes. Maybe it was not preserving the hue on desktop before and it does now?

You are right about Chrome on Android though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What I'm not so sure about is how it was determined that Safari's diverging behavior could lead to contrast issues, maybe that was referring specifically to the previous iOS implementation bug?

So, maybe a better wording would be

When placing visual elements over the accent color (e.g. a checkbox checkmark), Chrome and Firefox will automatically select a contrasting color, whereas Safari will modify the luminance of the accent color to preserve contrast. Safari on iOS up to version 26.4 didn't handle contrast issues. Current versions of Chrome on Android don't handle contrast issues.

With a caveat that it might have been in earlier versions of Safari on iOS, but there is no way for me to test that. I'm not very comfortable with maintaining compat issues like this in modern web guidance though. This will go out of date and we won't notice. We need a better way to pull this in from canonical places or at least some way to scan regularly for changes to these descriptions.

I also filed an issue in BCD to figure this one out for Safari.

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.

Accent color guide has contradictory claims about Safari’s accent color support

2 participants