Opened 3 weeks ago
Last modified 3 weeks ago
#36582 assigned Cleanup/optimization
Accessibility improvement for required field labels for inline forms in the admin.
Reported by: | Antoliny | Owned by: | Antoliny |
---|---|---|---|
Component: | contrib.admin | Version: | 5.2 |
Severity: | Normal | Keywords: | accessibility |
Cc: | Eliana Rosselli, Thibaud Colas, Sarah Abderemane, Tom Carrick | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently, in the admin, labels for required fields are displayed in bold.
The fact that the label is displayed in bold allows sighted users to recognize that the field is required, but users who rely on screen readers and cannot see the visual styling are unable to perceive this.
When accessing a label, additional descriptive text should be provided, or an element indicating that the field is required should be placed to the right of the label with appropriate ARIA attributes, so that users of screen readers can recognize that the field is required.
Personally, I prefer indicating required fields using a red asterisk (*).
Attachments (1)
Change History (6)
by , 3 weeks ago
Attachment: | Screenshot 2025-08-29 at 7.57.57 PM.png added |
---|
comment:1 by , 3 weeks ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 3 weeks ago
Type: | Uncategorized → Cleanup/optimization |
---|
follow-up: 4 comment:3 by , 3 weeks ago
Cc: | added |
---|
comment:4 by , 3 weeks ago
Replying to Sarah Boyce:
When I test with a screen reader, the required input elements are announced as required. So there's no missed information here
Bold is not conveying meaning by a different color (which would not work for color blind users), so I actually think we might be for this one.
I will let the accessibility team make the final call here though
Sorry! I should have provided more information. For regular forms, this isn’t really an issue, but for inline forms, even though required fields are displayed in bold, the inline form itself is not marked as required. This means that even if a field inside the inline is required when creating an object, there is no indication of its required status (other than the visual bold style).
The reason I focused on regular forms in the ticket is because, personally, I think it would be better to have something other than bold text some element explicitly indicating that a field is required. That way, the information would be provided consistently to both screen reader users and sighted users.
I suppose we’ll need to discuss further how exactly this issue should be addressed.
comment:5 by , 3 weeks ago
Summary: | Accessibility improvement for required field labels in the admin. → Accessibility improvement for required field labels for inline forms in the admin. |
---|---|
Triage Stage: | Unreviewed → Accepted |
Ok, inline forms need addressing. Potentially dynamically setting required when the new inlines are being filled but certainly setting required on the required fields of existing inline instances
When I test with a screen reader, the required input elements are announced as required. So there's no missed information here
Bold is not conveying meaning by a different color (which would not work for color blind users), so I actually think we might be for this one.
I will let the accessibility team make the final call here though