diff --git a/django/forms/boundfield.py b/django/forms/boundfield.py
index deba739329..b9f29e3da5 100644
|
a
|
b
|
class BoundField(RenderableFieldMixin):
|
| 290 | 290 | # If a custom aria-describedby attribute is given and help_text is |
| 291 | 291 | # used, the custom aria-described by is preserved so user can set the |
| 292 | 292 | # desired order. |
| 293 | | if custom_aria_described_by_id := widget.attrs.get("aria-describedby"): |
| | 293 | if custom_aria_described_by_id := attrs.get( |
| | 294 | "aria-describedby" |
| | 295 | ) or widget.attrs.get("aria-describedby"): |
| 294 | 296 | attrs["aria-describedby"] = custom_aria_described_by_id |
| 295 | 297 | elif self.field.help_text and self.id_for_label: |
| 296 | 298 | attrs["aria-describedby"] = f"{self.id_for_label}_helptext" |