feat[dev]: ✨ implement A11y improvements to sd-expandable #1476
Labels
A11y Audit
Identifies tasks related to accessibility improvements identified in the A11y audit of the DS
🔧 code
needs changes in code
Critical A11y Issue
Require immediate attention and resolution
Subtask
Epic subtasks
Description
This task describes the Storybook implementation for the sd-expandable component as part of the A11y improvements outlined in Epic #1465.
A11y improvements for sd-checkbox can be found here: sd-expandable Notes.
Comment
I don't know what to do with this pattern. There are two issues that I don't know how to solve with the current implementation:
Some thoughts:
aria-hidden=true
on the button is not an option because aria-hidden interactive elements are still accessible to screen reader users who use the Tab key.You could split the content slot into two slots, one that contains the visible portion and another that includes the entire (probably easier than the remaining) content. You swap them when the user clicks the button.
--component-expandable-max-block-size
.aria-expanded
on the button.Best Practices
Solution
We move the button element before the content which is hidden for screen readers until the user clicks the button. The button should also receive an explanatory screen reader information about the possibility to show the expandable content.
Pls also change the button text to something more specific and add a11y hints like mentioned in the best practices above.
DoR
DoD
feature
branchThe text was updated successfully, but these errors were encountered: