Toggle: Improve screen-reader accessibility #1557
Pull request checklist
Description of changes
The Toggle is currently not very accessible for screen-reader users as it doesn't have hooks that let us provide context on the option that's being toggled. This pull request adds two optional aria-labels that lets us provide more context on the on/off states for screen-reader users.
It's not ideal that the screen-reader re-announces the toggle onText and offText, however, this is not easily preventable as many browser/screenreader combinations will announce aria-hidden children while reading the parent.
Focus areas to test