<div class="searchWrap">
<label for="SearchBox">Search Scirra</label>
<input type="text" name="SearchBox" id="SearchBox" tabindex="1" />
<div class="s searchIco"></div>
</div>
Edit
Quick question also, the primary reason for this of course is to help the less fortunate, but does this stuff also help for SEO, as a web crawler is also essentially blind?
The label
element is still used, and I hope it stays that way (people with disabilities are especially thankful for them).
The clear semantic tie between the input element and the label
allow a screen reader to clearly dictate to the user what information should be entered to which inputs.
As for display: none
on it, I'm not sure if that will still be read. If not, you could try text-indent: -9999px
.
Fangs is a good screen reader emulator to test this out on. It requires FireFox.
Whilst on the topic of accessibility, you could turn that input into a HTML5 search
input.
Browsers that support it will know semantically exactly what it is as it can't infer it from your class
/id
/label
/etc.
I'm trying to just use it a describer for screen readers I don't want my regular visitors to see it as any text in that searchwrap detracts from the page style.
You could use the HTML5 placeholder
attribute, this will display some text inside the element which describes what it does (search in this case). It is not widely supported, but there is JavaScript that emulates it (I wrote a jQuery plugin that does it).
One last thing, is I like to put label { cursor: pointer }
in my CSS to help users know that it is clickable (very useful for checkboxes and radio boxes).