Re: [Offtopic] Re: Placeholder Text for Text Boxes

Hi Thomas and Maurice,

On Aug 20, 2007, at 10:19 AM, Thomas Broyer wrote:

>
> 2007/8/20, Maurice Carey:
>>
>> Also, is there, or is there going to be a way to indicate that an  
>> element
>> should be invisible for sighted users but any text in that element  
>> should
>> still be read for screen readers?
>>
>> For example:
>> For a design where I have to put the text "username" and  
>> "password" inside
>> the input since there was no space to have a proper <label> I'd  
>> like to be
>> able to have put a proper label for the benefit of blind users but  
>> still
>> have it display:none for sighted users since they'll be able to  
>> see the text
>> inside the input. I may have the text "username" and "password"  
>> appear by
>> using background images in the <input> since "password" in a  
>> password input
>> looks like "********"
>
> You should theoretically be able do achieve this effect simply using
> media-specific stylesheets/rules, but I've been told screen readers,
> because they "read the screen", apply the media="screen" stylesheets
> :-(
>
> It seems like people are actually using style="position: absolute;
> left: -9999px" to bring the text out of view but still have it read by
> screen readers (that's part of the techniques for replacing header's
> text with an image).

The INPUT element also accepts the @alt attribute. Though it wasn't  
intended for this purpose, it might still be useful for screen  
readers if the placeholder text got repeated there. Though we would  
need to test this to be suer before recommending authors follow that  
practice.

Take care,
Rob

Received on Tuesday, 21 August 2007 03:40:56 UTC