May 11, 200917 yr I'm trying to validate this site to WAI guidelines but am failing because of the search box. I'm having trouble understanding what I need to do from this error message: * Failure - INPUT Element, of Type TEXT, at Line: 38, Column: 1 in FORM Element at Line: 36, Column: 1 # Rule: 12.4.2 - Identify all TEXTAREA elements that do not have an explicit LABEL association. I've tried labelling the text input and adding an alt but neither works. Can anyone help me understand labelling etc in plain language?
May 11, 200917 yr You need to associate a LABEL tag with the form control... <label for="firstname">Search</label> <input type="text" name="firstname" id="firstname" /> <input type="submit" value="search" /> Reference http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/H44 Or you can add a TITLE attribute to the INPUT tag <input type="text" title="Type search term here" value="Type search term here"/> <input type="submit" value="Search"/>
May 13, 200917 yr Author Thanks bluedreamer! The label worked, screwed up the look of the input box for some reason but now I just need to style it.
Create an account or sign in to comment