WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Is generated content reliably read by screen readers today?

for

Number of posts in this thread: 5 (In chronological order)

From: Detlev Fischer
Date: Fri, Nov 23 2018 2:47AM
Subject: Is generated content reliably read by screen readers today?
No previous message | Next message →

Hi,

In 2013, there was a discussion here that stated that some browser /
Screenreader combinations did not reliably expose CSS-generated content
(via ::before). In the UA / SR combinations I have tried now, 5 years
later, CSS-generated text content was exposed and read. While I reckon
it is still not a recommended practice to use generated content on all
but decorative or supplemental information - is there still a case for
calling out such practice as WCAG failure?

Opinions?

Best, Detlev

--
Detlev Fischer
Testkreis
Werderstr. 34, 20144 Hamburg

Mobil +49 (0)157 57 57 57 45

http://www.testkreis.de
Beratung, Tests und Schulungen für barrierefreie Websites


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

From: Steve Green
Date: Fri, Nov 23 2018 5:58AM
Subject: Re: Is generated content reliably read by screen readers today?
← Previous message | Next message →

I have never liked the concept of CSS-generated content and I never use or recommend it, but I guess I'm in the minority because developers love it and there doesn't seem to be much push-back from the accessibility community.

Strictly speaking, it's not a WCAG non-compliance because CSS is an accessibility-supported technology. However, it's not going to work for some people, so it depends if you are satisfied with being WCAG-compliant or if you are aiming for a higher level of real-world accessibility.

CSS-generated content is not exposed to screen readers in Internet Explorer and it never will be. It is not exposed to people viewing with styles turned off unless a fall-back is provided. It may or may not be presented correctly to people who have overridden the stylesheets. That's enough for me to advocate against it, but it's your call.

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < = EMAIL ADDRESS REMOVED = > On Behalf Of Detlev Fischer
Sent: 23 November 2018 09:48
To: = EMAIL ADDRESS REMOVED =
Subject: [WebAIM] Is generated content reliably read by screen readers today?

Hi,

In 2013, there was a discussion here that stated that some browser / Screenreader combinations did not reliably expose CSS-generated content (via ::before). In the UA / SR combinations I have tried now, 5 years later, CSS-generated text content was exposed and read. While I reckon it is still not a recommended practice to use generated content on all but decorative or supplemental information - is there still a case for calling out such practice as WCAG failure?

Opinions?

Best, Detlev

--
Detlev Fischer
Testkreis
Werderstr. 34, 20144 Hamburg

Mobil +49 (0)157 57 57 57 45

http://www.testkreis.de
Beratung, Tests und Schulungen für barrierefreie Websites


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

From:
Date: Fri, Nov 23 2018 6:32AM
Subject: Re: Is generated content reliably read by screen readers today?
← Previous message | Next message →

When I tested this in 2015, the only browser not to accessibility
support the before/after pseudo-selectors, was IE. The common browser
and screen reader combinations across all platforms were able to handle
content generated in this way.
https://tink.uk/accessibility-support-for-css-generated-
On 23/11/2018 09:47, Detlev Fischer wrote:
> Hi,
>
> In 2013, there was a discussion here that stated that some browser /
> Screenreader combinations did not reliably expose CSS-generated content
> (via ::before). In the UA / SR combinations I have tried now, 5 years
> later, CSS-generated text content was exposed and read. While I reckon
> it is still not a recommended practice to use generated content on all
> but decorative or supplemental information - is there still a case for
> calling out such practice as WCAG failure?
>
> Opinions?
>
> Best, Detlev
>

--
@LeonieWatson tink.uk Carpe diem

From: Birkir R. Gunnarsson
Date: Fri, Nov 23 2018 6:43AM
Subject: Re: Is generated content reliably read by screen readers today?
← Previous message | Next message →

I filed an issue against WCAG failure technique f87
https://github.com/w3c/wcag/issues/433

which forbids use of CSS pseudo content. I filed it based on the fact
that the accessible name and description calculation includes CSS
generated content.

That being said, while I think it should be valid, I agree with the
great points that Steve makes that it is problematic for a variety of
reasons, so shoud not be recommended. Fortunately sVG icons are
increasingly replacing CSS icons, which is a win for accessibility,
minor screen reader sVG support issues aside.


On 11/23/18, Léonie Watson < = EMAIL ADDRESS REMOVED = > wrote:
> When I tested this in 2015, the only browser not to accessibility
> support the before/after pseudo-selectors, was IE. The common browser
> and screen reader combinations across all platforms were able to handle
> content generated in this way.
> https://tink.uk/accessibility-support-for-css-generated-
> On 23/11/2018 09:47, Detlev Fischer wrote:
>> Hi,
>>
>> In 2013, there was a discussion here that stated that some browser /
>> Screenreader combinations did not reliably expose CSS-generated content
>> (via ::before). In the UA / SR combinations I have tried now, 5 years
>> later, CSS-generated text content was exposed and read. While I reckon
>> it is still not a recommended practice to use generated content on all
>> but decorative or supplemental information - is there still a case for
>> calling out such practice as WCAG failure?
>>
>> Opinions?
>>
>> Best, Detlev
>>
>
> --
> @LeonieWatson tink.uk Carpe diem
> > > > >


--
Work hard. Have fun. Make history.

From: glen walker
Date: Fri, Nov 23 2018 11:22AM
Subject: Re: Is generated content reliably read by screen readers today?
← Previous message | No next message

Birkir said what I was going to say, namely that the accessible name
calculation specifically says the CSS content should be included. Step
2.F.ii (https://www.w3.org/TR/accname-1.1/#step2).

The fact that IE violates the spec is not necessarily a reason to not rely
on it. It just adds another situation where you have to decide if writing
your code to spec is good enough and if a situation doesn't work, then you
put the onus on the user agent to fix it. Or should you code around the
issue to make up for the shortcoming of the browser.

I agree with Steve's comment that if the user turns off style sheets, if
there is not a fall-back method, then this might cause a problem. But I
suspect there will be other problems with the page when stylesheets are
turned off so you'd probably have several things to fix.

And lastly, the case where a user has overridden style sheets, that's a bit
of a stretch. It's not a stretch to have a custom style sheet, but it's a
stretch that the custom style sheet would interfere with the content CSS
property. I have custom style sheets myself and they either augment or
replace a property. I have my own focus indicator for all elements so that
overwrites everything. I suppose if a style sheet has a content attribute
to add a "link opens in a new window" text to links, and I override the
style sheet with my own link styling and replace, rather than augment, then
yes, it could be a problem.

However, with all that being said, the content property of CSS is a weird
one because it's "content" and not styling. If you want to separate
content from styling, then the style sheet should only have styling
information and the page itself should have the content. That would be my
main argument for not using CSS content.

Glen