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

a11y: Dropdowns #388

Merged
merged 19 commits into from
Jul 19, 2023
Merged

a11y: Dropdowns #388

merged 19 commits into from
Jul 19, 2023

Conversation

albertfdp
Copy link
Contributor

@albertfdp albertfdp commented Jul 18, 2023

Description

This PR refactors the existing dropdown component and aligns it with Navigation Menubar, Menubar, and Menu button

  • It expands keyboard support to Home, End and Character key.
  • It automatically creates ids for toggle and menu when not present and uses them for aria-controls and aria-labelledby as per Menu button spec.
  • It moves the aria-expanded attribute to the toggle as per spec.
  • It supports also targetting role=menuitemradio, to better handle menus where there is an existing selection. It updates the templates as appropiate.

The PR also does minor updates to theme to better align with Garden styles.

Screenshots

Screenshot 2023-07-18 at 14 51 10

Checklist

  • 📗 all commit messages follow the conventional commits standard
  • ⬅️ changes are compatible with RTL direction
  • ♿ Changes to the UI are tested for accessibility and compliant with WCAG 2.1.
  • 📝 changes are tested in Chrome, Firefox, Safari and Edge
  • 📱 changes are responsive and tested in mobile
  • 👍 PR is approved by @zendesk/vikings

@albertfdp albertfdp self-assigned this Jul 18, 2023
@albertfdp albertfdp marked this pull request as ready for review July 18, 2023 13:27
@albertfdp albertfdp requested a review from a team as a code owner July 18, 2023 13:27
Copy link
Contributor

@luis-almeida luis-almeida left a comment

Choose a reason for hiding this comment

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

Looks good! When the required api update is ready 👍🏼

Copy link
Contributor

@luis-almeida luis-almeida left a comment

Choose a reason for hiding this comment

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

Refactor and tests look good, so no comments there 👍🏼

A couple of points:

  • Can we colocate the spec file with the source code?
  • Nit: no need to check in scipt.js and style.css as these are rebuilt upon every merge.

@albertfdp
Copy link
Contributor Author

@luis-almeida okay! I have now moved the test file next to the component

@luis-almeida luis-almeida merged commit 188df1b into master Jul 19, 2023
@luis-almeida luis-almeida deleted the afernandez/OH-2227 branch July 19, 2023 13:36
@zd-svc-github-copenhagen-theme
Copy link
Collaborator

🎉 This PR is included in version 3.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants