WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Using SVG to display text

for

From: Steve Green
Date: Jun 8, 2019 2:47AM


Thanks, that's just what I was hoping to hear. I wish I could share the code because it is utter filth - I think it's produced with Articulate or some similarly evil tool. Believe it or not, they are hiding that text with aria-hidden and applying the same text (usually, but not always) via an aria-label on the containing div. The entire page has role="application", so they have put tabindex="-1" on everything (text, links, buttons etc.) so that screen readers can access it. No native HTML elements are exposed to assistive technologies at all.

Furthermore, they are using JavaScript to control the tab sequence because the source order is completely random. But they forgot about the reverse tab sequence, which is all over the place.

Please excuse the rant, but I am extraordinarily pissed off with this crap and just feel the need to express feelings I can't share with the client.

Steve

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

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