Opened 3 years ago
Closed 3 years ago
#6002 closed defect (bug) (fixed)
"for" element on labels failing to allow people to click the label to activate the checkbox
Reported by: | topher1kenobe | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Photo Directory | Keywords: | |
Cc: |
Description
When I click on a label on the submission form, I expect it to activate the checkbox, but it doesn't, despite the HTML being proper. Firefox 95 on MacOS 11.6
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
This is because the HTML is not proper, the
for=
attribute must reference the ID of the checkbox, not the name of the checkbox.I've updated the code to place the checkbox inside the label instead.
inc/uploads.php
input type="checkbox" name="%s" required="required" /> <label for="%s">%s</label></div>',