Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What/Why
Adds
aria-controls
to the list of props inariaProps
.Previously, we've made the decision to not include
aria-controls
in favour ofaria-owns
for better compatability with aria 1.0 and therefore better compatability with screen readers. See Nick's comment and Ollie's comment on this topic.This has been re-prompted by a DAC audit of the GOV.UK Design System website, where we use the autocomplete for our search. DAC advised the following:
Following testing with all current major screen readers on
aria-owns
,aria-controls
and both, we've found no difference between the 3 scenarios. Therefore, we can confidently addaria-controls
to our aria props and removearia-owns
.Resolves alphagov/govuk-design-system#4004
Resolves #565
Notes
Voiceover on desktop and iOS don't seem to recognise the contents of the input whilst in the combobox. This was true before changing the aria prop so this isn't a regresion, but something to be concious of.