Omiting label element on self-explanatory form
I have a form that consists of an input box and a button. The button says "Search". For sighted users, it seems that no label
element is required for the input box as it is obvious that you enter search terms into the box and submit the form to get results.
However, no <label>
element for the input box... Is that an accessibility problem? If so, is there a non-hacky solution that would allow the label to show up only for users of screen readers and other assistive technology?
("Hacky" solutions might include hiding the text behind another element or off-screen or in a 1px x 1px element or having the text appear as the same color as the background. These all fail the smell test for me. Heck, I'm not even sure which ones of those would work. Smart screen readers might ignore them all.)