Skip to content

enhanceSelectElement does not correctly link to existing hint or error message #589

Open
@edwardhorsford

Description

@edwardhorsford

When using the enhanceSelectElement, an autocomplete may have a hint or error message, but unfortunately these are not linked with aria-describedBy from the input - so assistive technologies cannot get them.

The fix for this would be for the autocomplete code to grab the existing ids from aria-describedby from the select it's enhancing, and include those in addition to the instructions span it adds.

In the mean time, a fix is that the instructions added by the autocomplete are configurable by teams. We can make sure the instructions include any existing hint / error message.

When initialising an a given select as an autocomplete:

  • Get the ids mentioned in the select aria-describedby - there can be more than one when the field is in error.
  • Get the text content of those elements.
  • Concat the text content together.
  • Append with any instructions for AT for how to use the autocomplete
  • provide this as tAssistiveHint when initialising the autocomplete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions