RE: CSS property for visually hiding an element

Aural stylesheets are not used for screen readers, and screen still applies. 

As the name implies, a screen reader reads the screen.




-----Original Message-----
From: Patrick Dark [mailto:www-style.at.w3.org@patrick.dark.name] 
Sent: Tuesday, 4 April, 2017 04:23
To: David Woolley <forums@david-woolley.me.uk>; Oliver Joseph Ash <oliverjash@gmail.com>
Cc: www-style@w3.org
Subject: Re: CSS property for visually hiding an element

David Woolley 於 4/4/2017 4:33 AM 寫道:
> On 03/04/17 15:21, Oliver Joseph Ash wrote:
>> It is quite common for web developers to require an element to be 
>> hidden but only visually—that is, still accessible to screen readers 
>> and keyboard users, but not visible on the screen.
>>
>
> In principle, hiding visually, but not from a screen reader would be 
> done by:
>
> @media screen {
>    display: none;
> }
>
> However, I suspect that screen readers try too hard to approximate the 
> visual web page experience, that they will ignore hints aimed at them 
> in this way, simply because they are too rarely used to justify the 
> development effort.

One could also do the inverse:

@media aural {
     display: revert;
}

If screen readers can't figure that out, they aren't worth targeting.

Received on Tuesday, 4 April 2017 17:17:43 UTC