Reputation: 1
I have created a drop down for users to select a service and go to it. I checked the coding with my accessibility checker and it says it has two labels. Can any one spot where the error is can anyone help thanks
<form method="get" action="index.jsp">
<div>
<label for="articleid"><h3>Request it</h3></label>
<select id="articleid" name="articleid">
<optgroup label="Request it...">
<option value="409515">A dropped curb</option>
<option value="409516">A road closure</option>
<option value="409517">Adoption enquiry form</option>
<option value="409513">An exception to the rubbish collection service</option>
<option value="409519">Bulky waste collection</option>
<option value="409524">Fostering enquiry</option>
<option value="409521">Freedom of information</option>
<option value="409462">Musical instrument hire</option>
<option value="409525">Planning application advice</option>
<option value="409526">Reaserch service at the dorset history centre</option>
<option value="409512">School admissions appeal</option>
<option value="409527">Suggest a book, CD or film for the library</option>
</optgroup>
</select>
<input type="submit" value="Go">
</div>
</form>
Upvotes: 0
Views: 59
Reputation: 201738
The code is syntactically invalid (as http://validator.w3.org would tell), because the label
element must not contain a heading element. (They could be nested the other way around.) This may confuse a checker.
If this does not explain it, then the problem is either in the checker or elsewhere on the page (e.g., there is another label
element with the same for
attribute).
Upvotes: 2