Open dracos opened 1 year ago
Sounds sensible to me!
We’ll also want to make sure that the current click handler we have assigned to the real label (to toggle the menu) is added to the "fake" label instead.
To note our current behaviour: https://github.com/mysociety/fixmystreet/blob/9c9053065fd7692cc904bf4130fa51e1fd37aafd/web/cobrands/fixmystreet/fixmystreet.js#L1110 - we do as above, put the for back in and hide the label, and add a span
30 removed the
for
from the label. A further accessibility audit with a user who disabled all CSS but had JS enabled raised the issue that we then had an input with no matching label... I think the solution that fixes this but maintains the previous thing being solved also is therefore to revert #30, and instead create a copy of the label, and hide the label with thefor
. So it matches the item's behaviour.