mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #32819 -- Avoided adding 'aria-describedby' to hidden inputs.
Hidden elements are not visible for both accessibility tools and browsers presentation layer. This change therefore only reduces the size of the generated HTML.
This commit is contained in:
@@ -298,6 +298,7 @@ class BoundField(RenderableFieldMixin):
|
||||
and self.field.help_text
|
||||
and not self.use_fieldset
|
||||
and self.auto_id
|
||||
and not self.is_hidden
|
||||
):
|
||||
attrs["aria-describedby"] = f"{self.auto_id}_helptext"
|
||||
return attrs
|
||||
|
||||
Reference in New Issue
Block a user