Skip to content

[fix] Limited aria-describedby Support in Combobox Components #3449

Description

@tyler-maddox-gdit

ReactUSWDS Version & USWDS Version:

  • "react": "^18.2.0"
  • "react-dom": "^18.2.0"
  • "@trussworks/react-uswds": "^11.0.0"
  • "@uswds/uswds": "3.13.0"
  • "next": "^14.2.35"

Describe the bug

Currently, the only way to apply an aria-describedby property to Combobox components is by using the predefined --assistiveHint ID. This limitation prevents developers from associating multiple unique IDs for field descriptors to the Combobox input. Consequently, only a single descriptor can be programmatically announced to assistive technology users, which is insufficient for cases that involve multiple field descriptors.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Combobox component.
  2. Add an aria-describedby attribute using the --assistiveHint ID.
  3. Attempt to associate more than one unique ID as field descriptors to the same Combobox input.
  4. Observe that only one descriptor is programmatically announced.

Expected behavior

Combobox components should provide a mechanism to pass unique ID values to the aria-describedby attribute on the combobox input. This ensures accessibility compliance (specifically WCAG 1.3.1) for cases where multiple field descriptors are required to fully describe a field to assistive technologies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working like it's supposed to

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions