#32819: Fields’ help text and errors should be associated with input
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: David
| Smith
Type: Bug | Status: assigned
Component: Forms | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility, ui, | Triage Stage: Accepted
forms |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"7f0275d8cb6a590fa5e157cadeba776e9a790121" 7f0275d8]:
{{{
#!CommitTicketReference repository=""
revision="7f0275d8cb6a590fa5e157cadeba776e9a790121"
[5.0.x] Refs #32819 -- Used auto_id instead of id_for_label as unique
identifier for the field.
`id_for_label` is blank for widgets with multiple inputs such as radios
and multiple checkboxes. Therefore , `help_text` for fields using these
widgets cannot currently be associated using `aria-describedby`.
`id_for_label` is being used as a guard to avoid incorrectly adding
`aria-describedby` to those widgets.
This change uses `auto_id` as the unique identified for the fields
`help_text`. A guard is added to avoid incorrectly adding
`aria-describedby` to inputs by checking the widget's `use_fieldset`
attribute. Fields rendered in a `<fieldset>` should have
`aria-describedby` added to the `<fieldset>` and not every `<input>`.
Backport of 292f1ea90f90ff140617299a25884c8fda24aa64 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32819#comment:20>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018bd819dc50-ed561b3a-601a-4a36-a864-9847fff8b616-000000%40eu-central-1.amazonses.com.