Greetings, I noticed a couple bugs fix HTML on a couple things, but not all. In fact, I hit a stall on one bug, so I just removed myself from it. However, the problem still haunts me. Is there a community acceptable way to fix HTML validation of something like: <option value=""></option>? This happens in many places, and when someone fixes a missing </form> or </div> tag, my tendency is to see what other HTML creeps would be easy. Some are, but this one is not. Possibilities: <option value=””> </option> <option value=””>Enter something meaningful</option> (where the phrase is descriptive of what is expected, or what nothing really means in this case) Thoughts, feedback, updated coding guidelines? GPML, Mark Tompsett
The validation error in question is: "Error: Element option without attribute label must not be empty." There seems to be little to no human-readable documentation for that particular error, but it seems to mean that these are invalid: <option></option> <option value=""></option> This is valid for some reason, but doesn't appear to be a functional improvement: <option label="foo"></option> The "label" attribute for <option> isn't even supported by Firefox.
<option value=””> </option> <option value=””>Enter something meaningful</option> (where the phrase is descriptive of what is expected, or what nothing really means in this case)
The simple answer is to use
<option value=””>Enter something meaningful</option>
Like this: <option value=””> -- Choose -- </option> Unfortunately the situation isn't always simple, as with Bug 3311, "Statistical reports should error if row and column aren't selected" https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3311 The solution offered by the patches, while correct, may make the form harder to use because of visual clutter. I think it would be interesting to learn what benefits there might be to the various options for differently-abled users such as the visually impaired. -- Owen -- Web Developer Athens County Public Libraries http://www.myacpl.org
participants (2)
-
Mark Tompsett -
Owen Leonard