Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat[dev]: ✨ implement A11y improvements to sd-tooltip #1493

Open
7 of 15 tasks
Tracked by #1465
yoezlem opened this issue Oct 9, 2024 · 1 comment · May be fixed by #1712
Open
7 of 15 tasks
Tracked by #1465

feat[dev]: ✨ implement A11y improvements to sd-tooltip #1493

yoezlem opened this issue Oct 9, 2024 · 1 comment · May be fixed by #1712
Assignees
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

Comments

@yoezlem
Copy link
Contributor

yoezlem commented Oct 9, 2024

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.

  • Solution: Toggle with the first click.

Problem: The button doesn't have an accessible name.

  • Solution: Provide a label for the icon.

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.

  • Solution: Put 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 #1700

Problem: 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.

  • Solution: I'm not exactly sure what's causing this problem (and probably others), but I think it's because you're sloting a slot element.

<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).

Problem: Scrollable content is not accessible to keyboard users because the tooltip closes when you try to tab into it to scroll.

  • Solution: Make the scrollable area keyboard focusable and don't close the tooltip when focus moves.
    -> 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

  • Don’t use tooltips for critical or unique information.
  • Avoid long text in tooltips.

Related WCAG criteria

Additional resources

Open Questions

  • Question1
  • Question2

DoR

  • Item has been estimated by the team
  • Item dependencies have been identified and documented

DoD

  • Documentation has been created/updated (if applicable)
  • Migration Guide has been created/updated (if applicable)
  • Relevant E2E tests (Features, A11y, Bug fixes) are created/updated
  • Relevant stories (Features, A11y) are created/updated
  • Implementation works successfully on feature branch
@yoezlem yoezlem added 🔧 code needs changes in code Subtask Epic subtasks labels Oct 9, 2024
@yoezlem yoezlem added the A11y Audit Identifies tasks related to accessibility improvements identified in the A11y audit of the DS label Oct 9, 2024
@karlbaumhauer karlbaumhauer moved this from 📋 Backlog to ⚙️ To be refined in Solid Design System Project Board Oct 11, 2024
@yoezlem yoezlem added the Critical A11y Issue Require immediate attention and resolution label Oct 25, 2024
@coraliefeil
Copy link
Contributor

I’ve updated the a11y section in the docs

@yoezlem yoezlem moved this from ⚙️ To be refined to 🔖 Ready in Solid Design System Project Board Nov 22, 2024
@Vahid1919 Vahid1919 self-assigned this Nov 27, 2024
@Vahid1919 Vahid1919 moved this from 🔖 Ready to 🏗 In progress in Solid Design System Project Board Nov 27, 2024
@Vahid1919 Vahid1919 linked a pull request Dec 6, 2024 that will close this issue
4 tasks
@Vahid1919 Vahid1919 linked a pull request Dec 12, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

4 participants