Support aria-labelledby as a replacement for checkboxes and radio buttons
Created by: umpox
Description
We enforce that all AccessibleFieldType
components are provided with either aria-label
(hidden) or label
(visible) to make them accessible.
This can be problematic when migrating, as in some cases we need an external label for custom styling reasons. This PR allows support for aria-labelledby
as an alternative option to ensure components can still support this.
Test plan
- Using a screen reader with
aria-labelledby
examples using bothspan
and alabel
element - Unit tests