feat[dev]: ✨ implement A11y improvements to sd-tooltip #1493
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-tooltip component as part of the A11y improvements outlined in Epic #1465.
A11y improvements for sd-tooltip can be found here: sd-tooltip Notes.
Comment
Problem: Users must click the button twice the first time to toggle it.
Problem: The button doesn't have an accessible name.
Problem: By definition, a tooltip is "A contextual popup that displays a description for an element.", but the button in this component is not connected to the tooltip.
aria-describedby="tooltip"
on the button, not the slot.-> We have to add a new "story" in docs (Storybook & Figma) which shows tooltip being overwritten with the default button as a trigger and then showing how to connect button by
aria-describedby="tooltip"
. Some limitations are left here: fix: 🤔 Slotted content is not accessible for sd-tooltip #1700Problem: Using the virtual cursor, screen reader users access the tooltip content before the button in NVDA and VO. It should be the other way around.
<slot slot="anchor"></slot>
-> wrap a div around:
<div slot="anchor"><slot>Hello World</slot></div>
Problem: Disabled buttons are focusable and operable (although in an unexpected way; see video).
Video Example: https://www.notion.so/matuzo/sd-tooltip-10ef3f6e1bc080b5a2f2c4d4a6076500?pvs=4#10ef3f6e1bc080bf9518ea23fdb012d9
Problem: Scrollable content is not accessible to keyboard users because the tooltip closes when you try to tab into it to scroll.
-> make it only focusable if content is overflowing.
Recommendation to only include short text is added to the Do's and Don'ts.
Best Practices
Related WCAG criteria
Additional resources
Open Questions
DoR
DoD
feature
branchThe text was updated successfully, but these errors were encountered: