Capgemini / dcx-react-library

React Library UI/UX agnostic
https://main--6069a6f47f4b9f002171f8e1.chromatic.com
MIT License
107 stars 7 forks source link

Update the autocomplete so that screen readers behave properly #644

Closed alexwbbr closed 1 month ago

alexwbbr commented 1 month ago

Describe the bug When a screen reader gets to the autocomplete it will read out the hidden accessibility text first before the descriptive label. This needs to be changed so that the label and hint for the autocomplete is read first before the hidden accessibility text.

The autocomplete should also close the options list on blur as that is causing some confusion with screen readers which can cause text to be read out of order again.

All of the examples in the government design accessible autocomplete close on blur so I think we should follow suit. https://alphagov.github.io/accessible-autocomplete/examples/

daniele-zurico commented 1 month ago

closed by https://github.com/Capgemini/dcx-react-library/pull/645