This small PR fixes a11y issue on Choice component (used inside Checkbox). When helpText attribute is provided, previously it was set as aria-describedby attribute. However, this attribute should receive ID of an element.
The change here is to assign ID (based on ID of Choice element) to Help Text div and use this id for aria-describedby attributes in input
Guidelines
Make sure the pull request:
[ ] Follows the established folder/file structure
[ ] Adds unit tests
[ ] If it is a refactor or change to an existing component, have you verified it won't break existing Cypress tests or have you updated them?
[ ] Did you verify some accessibility (a11y) basics?
Problem/Feature
This small PR fixes a11y issue on Choice component (used inside Checkbox). When
helpText
attribute is provided, previously it was set asaria-describedby
attribute. However, this attribute should receive ID of an element. The change here is to assign ID (based on ID of Choice element) toHelp Text
div and use this id foraria-describedby
attributes ininput
Guidelines
Make sure the pull request:
proptypes
) Guidelines