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-accordion and sd-accordion-group #1496

Open
1 of 9 tasks
Tracked by #1465
yoezlem opened this issue Oct 9, 2024 · 0 comments
Open
1 of 9 tasks
Tracked by #1465
Labels
A11y Audit Identifies tasks related to accessibility improvements identified in the A11y audit of the DS 🔧 code needs changes in code Subtask Epic subtasks

Comments

@yoezlem
Copy link
Contributor

yoezlem commented Oct 9, 2024

Description

This task describes the Storybook implementation for the sd-accordion and sd-accordion-group component as part of the A11y improvements outlined in Epic #1465.

A11y improvements for sd-accordion and sd-accordion-group can be found here: sd-accordion and sd-accordion-group Notes.


Comment

No critical issues found.

Notes

  • Many implementations of accordions use headings (h2 or h3) with nested buttons instead of the header element for the accordion header because headings provide a convenient additional way of navigation for screen reader users.
    There is an example where you slot an h4, but this heading ends up nested inside a button, which means that the heading is not discoverable in some screen readers. The other way around, it works fine.
<h4><button>heading</button></h4> <!-- good -->
<button><h4>heading</h4></button> <!-- bad -->
  • Instead of changing the role of the header element to button and adding tabindex, consider using an actual button element to decrease complexity.
  • Each content slot is a named region. That's generally fine, but on a page with many accordion items (e.g., a FAQ page) where most or all of them are expanded, having too many landmarks can pollute landmark navigation.

Best Practices

  • Hiding content can become a potential barrier, making content more challenging to discover. Use this pattern only for non-critical information.

Additional resources

https://www.w3.org/WAI/ARIA/apg/patterns/accordion/

Open Questions towards design

  • 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
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 Subtask Epic subtasks
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant