WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Using SVG to display text

for

From: Patrick H. Lauke
Date: Jun 8, 2019 2:18AM


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