WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Using SVG to display text

for

From: Jonathan Avila
Date: Jun 8, 2019 5:58AM


While I'd agree that SVG text rendering today doesn't meet the intent of 1.4.5 I'd say that your assertion that the nuance is not in the normative text of the SC and as the normative text is written there is a strong case to say it's not a fail of the success criteria (unfortunately). Definitely something that impacts the user though and worth noting and recommendation changes both to user agents and when use is widespread by authors.

Jonathan


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Patrick H. Lauke
Sent: Saturday, June 8, 2019 4:19 AM
To: <EMAIL REMOVED>
Subject: Re: [WebAIM] Using SVG to display text

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


On 08/06/2019 07:02, Steve Green wrote:
> I am working on a truly horrible e-learning application in which all the text has been implemented using SVG <text> elements. With respect to WCAG success criterion 1.4.5 (Images of Text), would you consider such content to be text or an image of text?
> > To me, it seems to be in between. The <text> element supports some
CSS styles (such as font size), but does not support others (such as line-height), so it cannot be visually customized to the user's requirements.
>
> I would like to say this violates 1.4.5, but I would welcome other opinions.

While arguably it's "text" (already a step up from, say, the vector outlines of the characters themselves), you're right that it doesn't allow the text to be customised by users (which is the idea behind 1.4.5). You could argue that it's a shortcoming of the UAs/of SVG as a technology itself (so, for the latter, kind of exempting itself a bit based on the " If the technologies being used..." preamble of the SC)...but it can also be argued that there's really no reason/need for the content to be using SVG in the first place if other alternatives like HTML are viable.

Based on the intent in
https://www.w3.org/WAI/WCAG21/Understanding/images-of-text.html

"The intent of this Success Criterion is to encourage authors, who are using technologies which are capable of achieving their desired default visual presentation, to enable people who require a particular visual presentation of text to be able to adjust the text presentation as needed. This includes people who require the text in a particular font size, foreground and background color, font family, line spacing or alignment."

I'd say that unless the SVG also had custom controls/settings that allowed users to change the text to their needs (thus meeting the
"Customizable: The image of text can be visually customized to the user's requirements;" exception), this is indeed a fail.

P
--
Patrick H. Lauke

www.splintered.co.uk | https://github.com/patrickhlauke http://flickr.com/photos/redux/ | http://redux.deviantart.com
twitter: @patrick_h_lauke | skype: patrick_h_lauke