Closed martindholmes closed 2 months ago
This turns out to be caused by the fact that my original plan in issue #268 was bad; electing to use the HTML <label>
element in the configuration file is a bad idea, because in many of the contexts we output "labels", an HTML <label>
is the wrong component because it has a specific function tied to a single form control.
I now believe we should have chosen <span>
instead, allowing the use of CSS classes or @style
, but avoiding the problem of the @for
attribute. Where the target filter caption is in fact a label, its contents can be substituted; otherwise, we just output the span in the required context.
I believe that the labeling stuff hasn't made it into a release yet, so I don't see any issue with reversing course and switching this to a <span>
; one can always add aria-*
attributes to make it operate as a label, if I'm understanding this correctly.
Fix committed in commit 88e81f2. If no problems emerge, this can be closed.
This seems fine, so closing.
When I validate our test suite pages with vnu.jar in the dev branch (not in the release-1.4 branch), I get the following errors:
This is because the we're doing stuff like this:
@for
is only supposed to point to a form control, not to a fieldset, and has the side-effect that interacting with the label can manipulate the control. Since these labels are not for that purpose, I would suggest just dropping the<label>
element and substituting<span class="label">
. This error was introduced (by me) when working on issue #268.