Re: CSS issue: Need fallback alternatives for CSS generated *text* content containing unicode glyphs

On 11/13/2012 02:41 PM, James Craig wrote:
> With the following markup:
>
>  <li role="treeitem" aria-expanded="false" class="expandable">Vegetables</li>
>
> And this CSS:
>
>  .expandable:before { content: "\25BA"; /* a.k.a. ► */ }
>
> The text character is exposed to accessibility trees according to the rules in the ARIA text alternative computation [1]. This character is spoken by some screen readers or text-to-speech engines as "Black right-pointing pointer" according to the unicode description for the character.
>
> So the expandable tree item is spoken like this:
>
>  "Black right-pointing pointer, Vegetables, collapsed"
>
> This is obviously not ideal, as the glyph is intended as a style that is already conveyed semantically via the attributes, and should be spoken as this:
>
>  "Vegetables, collapsed" (the 'collapsed' string varies by screen reader, but is generated based on aria-expanded="false")

How about making
   @media not speech {
     .expandable:before { content: "\25BA"; /* a.k.a. ► */ }
   }
work?

~fantasai

Received on Friday, 16 November 2012 03:42:54 UTC