-
Notifications
You must be signed in to change notification settings - Fork 257
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
1.4.5 / 1.4.9 Image of Text and <text> inside SVGs #773
Comments
My simple yardstick (which hadn't previously been challenged by the scenario SteveG talked about) was generally: Is it bitmap or not? SVG stays crisp when zoomed, but UAs don't provide the same controls as HTML based text, so I see the point about it not meeting all of the intent of images-of-text. I haven't done much experimentation with complex SVGs, but my understanding is that:
The first issue I'd put to user-agents, the second is more tied to the purpose & capabilities of SVG. Overall, it would be useful to add some nuance for what is basically vector text used in different ways than HTML text without accessibility-support for adaptation. E.g. SVG is considered an image. If the size, position & color must be relative to its surroundings (e.g. graphs/infographics) then it does meet the "to achieve a particular visual effect" aspect. If not, then it fails 1.4.5. |
1.4.5: "font, size, color, and background can be set"I'd say: If a few rules are followed when designing SVG, it is no problem to make it compatible with SC 1.4.5.
Since 1.4.12 for text does not require the website to offer the possibility of adaptation, but only the page must not prevent adaptation, the claim should not be higher for text in SVG. Of course, it is also possible to offer a tool like in G175, with which the colors/size/font can be adapted inside SVGs (https://www.w3.org/WAI/WCAG21/Techniques/general/G175). 1.4.9: "No Exception"Since there is no exception, any SVG would violate the SC. |
I agree with @JAWS-test. The question simply is "Can you customize text (font, size, color, and background) of I created a little code pen with 3 different types of SVGs https://codepen.io/collection/XEzrkj After reviewing the normative text of 1.4.5 closely, I believe the following:
Can AGWG make a ruling on this? I'd like us to be consistent with this answer across our industry. |
Many thanks for the examples, @goodwitch. I took a closer look at the first example:
I do not consider this to be acceptable. Therefore I would consider SC 1.4.5 only to be fulfilled for SVG graphics if colors are used that can be adjusted without additional effort, i.e. if the SVG graphic inherits the colors of the HTML document and does not define its own colors. Imagine a document with several SVG graphics, each with different text elements with different backgrounds. Then I have to be an expert in CSS and SVG and furthermore I have to have a lot of time to adjust the colors to my needs. Another problem is to adjust the font size or to select a different font with a different letter spacing. Both can be easily done in SVG via User Style, but neither the objects in the background nor the graphics as such scale. This means that I quickly run the risk that my text is no longer displayed completely. |
@JAWS-test from the normative of 1.4.5, Windows High Contrast Mode is not required...right? So...if we are sticking to normative...I believe we've got to let this pass (as a sad low option). OR...somebody needs to add a note clarifying that this is NOT a pass. In reality...I technically think this is a sad low pass of normative (and should be addressed in a WCAG 2.x release or silver). P.S. I've always been curious...what is your real name, @JAWS-test ? (I'm Glenda Sims at Deque) |
|
Ongoing discussion (today) about whether or not text inside SVGs passes "Images of Text".
https://webaim.org/discussion/mail_thread?thread=9282&id=40208#40208
The normative wording only defines "images of text" as https://www.w3.org/TR/WCAG21/#dfn-images-of-text
Generally, this is understood to mean text that's been presented as part of a bitmap or something. SVG can contain text as actual
<text>
elements of similar. So from this perspective it would pass these SCs.However, once you dig into the rationale for/the intent of the SC, it becomes clear that the idea is that text (rather than images of text) can also be adapted more easily to users' needs
https://www.w3.org/WAI/WCAG21/Understanding/images-of-text.html
This is currently not the case for SVG text...changing any preferred font size/typeface/etc settings in the browser has no effect on text inside SVGs. No current user agent provides the ability to change these by default. So...unless a site that uses SVG text also provides custom mechanisms/controls (to satisfy the "Customizable: The image of text can be visually customized to the user's requirements"), I feel this is actually a fail.
I'll hazard a guess that this was not even an issue at the time WCAG 2.0 came out / wasn't really considered then. However, it would now be good to provide some guidance, and to perhaps expand the normative definition of "images of text" accordingly.
What's everybody else's take?
The text was updated successfully, but these errors were encountered: