[WCAG, a11y] Custom color settings overwrite `fill` attributes of SVG elements
Categories
(Firefox :: Disability Access, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | affected |
People
(Reporter: henne, Unassigned)
Details
Attachments
(1 file)
91.99 KB,
image/png
|
Details |
Steps to reproduce:
- Start Firefox
- Go to "Settings" -> "General" -> "Language and appearance"
- Under "Colors" click the "Manage colors button"
- Define custom colors for "Text and Background" and "Link colors"
- Do NOT check "Use system colors"
- In the "Override the colors..." dropdown select "Always"
- Click "OK" and leave the "Settings" page
- Open example page at https://www.highcharts.com/demo/highcharts/accessible-pie
Actual results:
The example page renders a pie chart SVG. However, the areas of the chart cannot be distinguished from each other, since they are all in the same color. The chart is not accessible and fails international a11y tests.
Inspecting the HTML in the Developer Tools shows that the fill
attributes of the child elements of the SVG are set to window
.
Expected results:
The areas of the chart should be rendered with different patterns that are accessible for users with visual impairments.
The fill
attributes of the SVG's child elements should be respected and point to the pattern definitions via url(#highcharts-pattern-...)
.
Comment 1•3 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 months ago
|
||
Core: SVG
seems like the proper component to me.
Comment 3•3 months ago
|
||
It's not really clear to me how best to handle this. In general, setting "Override the colors..." to "Always" is a clear request to use the specified colors instead of whatever the content calls for; how is the browser to know that in this example, it should still respect the SVG fill
instead of replacing it with the user's chosen color? I suppose one heuristic might be to say that if the fill
is not a solid color, then it should be kept unchanged; but that could leave unexpected bits of all kinds of colors as part of the pattern, which may be unwanted.
I'm moving this to Accessibility to seek some more guidance as to what the expected behavior here should be, though it may end up back in SVG once it's clearer what we should do.
Comment 4•3 months ago
|
||
fill
in general works with HCM and is not forced like other background-color
. This seems like a highcharts issue, something in their pattern generator relies on element backgrounds to generate patterns, i assume. It's hard to make sense of it in their minified code.
Comment 5•2 months ago
|
||
The severity field is not set for this bug.
:morgan, could you have a look please?
For more information, please visit BugBot documentation.
Comment 6•2 months ago
•
|
||
I agree with eitan, sounds like they should be using forced-color-adjust: none
or similar, if that's their desired behaviour. I'm not sure how we support patterns on a larger scale for HCM and SVG's. I think we have to rely on authors to express their intent via the media queries that are available to them to manipulate HCM/forced-colors experiences.
That said, if you see this as a larger a11y issue I'm happy to leave it in Disability Access until we have a better solution. I'll keep it in this component for now :)
Updated•2 months ago
|
Comment 7•2 months ago
|
||
Marking as New as it reproduces on Win11x64 using Firefox build 130.0a1. If not correct please update. Thank you.
Comment 8•2 months ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Description
•