Skip to content

Fix diff mode selector accessibility#8879

Merged
andreslucena merged 2 commits intodecidim:developfrom
mainio:fix/diff-mode-accessibility
Feb 23, 2022
Merged

Fix diff mode selector accessibility#8879
andreslucena merged 2 commits intodecidim:developfrom
mainio:fix/diff-mode-accessibility

Conversation

@ahukkanen
Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen commented Feb 22, 2022

🎩 What? Why?

Currently users using keyboard commands or speech voice control cannot focus the diff mode selector dropdown. This PR fixes that.

There are also other accessibility issues with this element:

  • The dropdown behavior is not consistent with the other dropdowns on the page (everything that looks like a dropdown should behave like a dropdown)
  • The dropdown is missing a screen reader label
  • The diff mode is not dynamically announced for the screen reader when it changes (thus, the aria-live attribute)

WCAG 2.2 / 2.1.1 Keyboard (Level A)
WCAG 2.2 / 4.1.2 Name, Role, Value (Level A)

https://www.w3.org/TR/WCAG22/#keyboard
https://www.w3.org/TR/WCAG22/#name-role-value
https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html
https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html

Testing

Ask a user using either keyboard controls or speech control to test the diff mode dropdown.

📋 Checklist

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

📷 Screenshots

decidim-diff-mode.mp4

@andreslucena andreslucena added team: accessibility type: fix PRs that implement a fix for a bug module: core labels Feb 22, 2022
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the time on this one and the video 👏🏽 👏🏽

@andreslucena andreslucena merged commit f2e22e2 into decidim:develop Feb 23, 2022
@andreslucena
Copy link
Copy Markdown
Member

Can you please backport to v0.26-stable 🙏🏽? Thanks

@ahukkanen ahukkanen deleted the fix/diff-mode-accessibility branch February 23, 2022 12:48
ahukkanen added a commit to mainio/decidim that referenced this pull request Feb 23, 2022
@ahukkanen
Copy link
Copy Markdown
Contributor Author

Backport at #8900.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: core team: accessibility type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants