In addition to background-image
, when what you want to appear is text and you want the content to be read by screen readers, it's worth using placeholder
. The text of placeholder
will appear while nothing is typed and disappear focus on the element and start writing.
<input type="text" name="search" placeholder="Pesquisar no site"/>
View in jsfiddle .
Because old IEs do not support placeholder, here's polyfills in Web Forms: input placeholder link
Note: The difference between placeholder
and imagem via CSS
usage is that the first case is indicated when you want the content to be read by screen reading support tools used by low vision or blind people, and the second is indicated when the annotation is merely visual and there is no harm in being ignored,