{"id":2908,"date":"2015-04-08T09:58:03","date_gmt":"2015-04-08T13:58:03","guid":{"rendered":"http:\/\/www.equipmentlink.org\/blog\/?p=2908"},"modified":"2015-04-08T09:58:03","modified_gmt":"2015-04-08T13:58:03","slug":"form-fields-with-visible-labels-web-tip-41-4815","status":"publish","type":"post","link":"http:\/\/www.equipmentlink.org\/blog\/?p=2908","title":{"rendered":"Form fields with visible labels, Web Tip #41, 4\/8\/15"},"content":{"rendered":"<p><strong>Form Fields Without Visible Labels<\/strong><\/p>\n<p>Sometimes form fields, such as a search text box, do not have visible label text. In order to be accessible, these fields must have descriptive text provided in one of two ways:<\/p>\n<ul>\n<li>Use the title attribute in place of a <a href=\"http:\/\/webaim.org\/techniques\/forms\/controls\">label<\/a>. If a form field has a title, but no label, the screen reader will read the title as if it were a label. Using the title attribute will also create a tooltip that will be visible if a user hovers over the form field with a mouse.<\/li>\n<\/ul>\n<p>Use the &lt;label&gt; element and hide the label element <a href=\"http:\/\/webaim.org\/techniques\/css\/invisiblecontent\/\">off-screen using CSS<\/a>. This technique has the advantage of creating a label that will be visible when styles are disabled. It is also possible to use CSS to create a label where part of the text is visible and part of the text is hidden off-screen.<\/p>\n<div class=\"al2fb_like_button\"><div id=\"fb-root\"><\/div><script type=\"text\/javascript\">\n(function(d, s, id) {\n  var js, fjs = d.getElementsByTagName(s)[0];\n  if (d.getElementById(id)) return;\n  js = d.createElement(s); js.id = id;\n  js.src = \"\/\/connect.facebook.net\/en_US\/all.js#xfbml=1&appId=149587675112835\";\n  fjs.parentNode.insertBefore(js, fjs);\n}(document, \"script\", \"facebook-jssdk\"));\n<\/script>\n<fb:like href=\"http:\/\/www.equipmentlink.org\/blog\/?p=2908\" layout=\"standard\" show_faces=\"true\" share=\"false\" width=\"450\" action=\"like\" font=\"arial\" colorscheme=\"light\" ref=\"AL2FB\"><\/fb:like><\/div>","protected":false},"excerpt":{"rendered":"<p>Form Fields Without Visible Labels Sometimes form fields, such as a search text box, do not have visible label text. In order to be accessible, these fields must have descriptive text provided in one of two ways: Use the title attribute in place of a label. If a form field has a title, but no [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[27,14,29,35],"tags":[],"_links":{"self":[{"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2908"}],"collection":[{"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2908"}],"version-history":[{"count":1,"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2908\/revisions"}],"predecessor-version":[{"id":2909,"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2908\/revisions\/2909"}],"wp:attachment":[{"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2908"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.equipmentlink.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}