[a11y] SidePanel: toggle button aria-labelledby reference is broken when collapsed
Closed this issue ยท 1 comments
๐ Bug Report
A clear and concise description of what the bug is.
When SidePanel component is in a collapsed state, the ToggleButton sub-component is still using the same aria-labelledby id
reference to the heading that can no long be found in the DOM.
This issue can also be observed on the aria-labelledby
reference on the <section>
element.
To Reproduce
Steps to reproduce the behavior:
All browsers, all screen readers.
- Turn on VoiceOver (macOS), launch Safari
- Navigate to Storybook Basic Example
- Set rotor to "landmarks": Ctrl + Opt + Cmd + RightArrow
- Jump to landmark "Tasks Panel, region": Ctrl + Opt + Cmd + DownArrow
- Observe: VoiceOver finds the Side Panel Basic example
- Read Toggle Button: Ctrl + Opt + RightArrow
- Observe: "Tasks Panel, expanded button"
- Activate button: Ctrl + Opt + SpaceBar
- Read backward to previous heading: Ctrl + Opt + Cmd + Shift + h
- Repeat STEP 4: Jump to landmark
- (ISSUE) Observe VoiceOver cannot find landmark anymore
- (ISSUE) Observe toggle button is now described as "collapsed button"
Expected Behavior
A clear and concise description of what you expected to happen.
The Side Panel landmark region should work regardless of expanded / collapsed state. The <section>
element must have a valid accessible name.
The Toggle Button must have a valid accessible name.
Actual Results
A clear and concise description of what actually happens
Please refer to steps 11, 12 in the reproduction steps. Refer to attached screen shots.
Browser (if applicable)
If this was a visual bug, what browser did you spot it on?
All of them.
Link to repl or repo (highly encouraged)
Please provide a reference to a repo or branch to help us reproduce this bug.
Storybook Basic Example
It occurs to me with the release of the new AccessibleHide component, I wonder if that can be used in the SidePanel component when it is in a collapsed state. This would preserve the 'aria-labelledby' id reference even while the element is not visible on screen.