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.
--
Ticket URL: <https://code.djangoproject.com/ticket/33235>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: Thibaud Colas, David Smith, Tom Carrick (added)
* keywords: => accessibility, forms, wcag
* stage: Unreviewed => Accepted
Comment:
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:
{{{#!python
def id_for_label(self, id_):
return ''
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33235#comment:1>
* owner: nobody => David Smith
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33235#comment:2>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/15061 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/33235#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/33235#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"c6c6cd3c5ad9c36795bb120e521590424f034ae4" c6c6cd3]:
{{{
#!CommitTicketReference repository=""
revision="c6c6cd3c5ad9c36795bb120e521590424f034ae4"
Fixed #33235 -- Removed "for = ..." from MultiWidget's <label>.
This improves accessibility for screen reader users.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33235#comment:5>