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

The cards collected by the system after the user answers all questions #12

Open
mohammad-suliman opened this issue Jan 15, 2023 · 0 comments

Comments

@mohammad-suliman
Copy link

Problem description:

After the user answers all the questions provided by the chatbot, the system collects a set of cards which have the following accessibility issues:

  • The headings hierarchy is problematic - as each card has its title as h1
  • each card can be expanded and collapsed - however, this information regarding expand / collapse is not available for a screen reader, and the operation can't be completed using only the keyboard
  • The component which expands and collapses the information has no semantic information for assistive technologies like role and state
  • The information revealed after expanding a card is not adjacent from a DOM perspective to the component which reveals it, so a screen reader user might not find it at all

Solution:

  • Fix the heading hierarchy
  • Add semantic information for the component which expands the information:
    • A role like a link or a button
    • A state with aria-expanded = true when it's expanded, and false when it's collapsed
  • Ad the component to the tab order with tabindex = 0, and implement keyboard click handlers
  • Add a CSS styling to accommodate for the focus visible effect
  • It's very important to define the section the link or the button reveals adjacent to the button or the link itself in the DOM, so a screen reader user reaches the revealed content immediately after it's revealed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant