Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(a11y): combobox - aria-describedby error is not associated initia…
…lly (#1318) - CDE-794 A11y Clarity Combobox > aria-describedby error is not associated initially when the combobox is touched and loses focus. ## PR Checklist Please check if your PR fulfills the following requirements: - [ ] Tests for the changes have been added (for bug fixes / features) - [x] Docs have been added / updated (for bug fixes / features) - [ ] If applicable, have a visual design approval ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## What is the current behavior? The Combobox has `required` attribute added to the template. Once the Combobox is touched and loses focus (click outside without selecting any option), the required error validation is triggered and the error message appears on the screen, however the id of the error container is not associated to `aria-describeby` of the Combobox input at this time. Hence the screen reader does not read out the error. <!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> Issue Number: [CDE-794](https://jira.eng.vmware.com/browse/CDE-794) ## What is the new behavior? The id of the error container will be added to the `aria-describeby` of the Combobox input if a required error occurs. The screen reader will read out the error. ## Does this PR introduce a breaking change? - [ ] Yes - [x] No <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information Updated the Combobox story in Storybook to demo this fix. --------- Co-authored-by: Andrea Fernandes <andreaf1@vmware.com> Co-authored-by: GitHub <noreply@github.com>
- Loading branch information