Opened 3 years ago
Closed 3 years ago
#33235 closed Cleanup/optimization (fixed)
Remove "for = ..." from MultiWidget's <label>.
Reported by: | Maxim Danilov | Owned by: | David Smith |
---|---|---|---|
Component: | Forms | Version: | 3.2 |
Severity: | Normal | Keywords: | accessibility, forms, wcag |
Cc: | Thibaud Colas, David Smith, Tom Carrick | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The instance from Raw MultiWidget class generate id_for_label like f'{id_}0'
It has not sense.
For example ChoiceWidget has self.add_id_index and I can decide it myself, how I will see label_id - with or without index.
I think, it is better to remove completely id_for_label method from MultiWidget Class.
Change History (5)
comment:1 by , 3 years ago
Cc: | added |
---|---|
Keywords: | accessibility forms wcag added |
Summary: | MultiWidget id_for_label → Remove "for = ..." from MultiWidget's <label>. |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 3 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
I agree that we should remove
for
from MultiWidget's<label>
but not because "It has not sense" but to improve accessibility when using a screen reader, see also #32338. It should be enough to return an empty string: