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

Action menu avatar item #2165

Merged
merged 11 commits into from
Jul 31, 2023
Merged

Action menu avatar item #2165

merged 11 commits into from
Jul 31, 2023

Conversation

camertron
Copy link
Contributor

What are you trying to accomplish?

This PR implements the following accessibility fixes for the ActionMenu component:

  1. the component should explicitly disallow passing an aria-label to leading icons.
  2. the component should disallow providing alt text to avatars.
  3. the component should support a special type of list item for avatars that enforces a) no alt text, and b) ensures the username appears as the item text.

Screenshots

No visual changes

Integration

Yes. Several usages of NavList will need to stop calling #with_leading_visual_avatar in favor of #with_avatar_item.

List the issues that this change affects.

Fixes #https://github.com/github/primer/issues/2246

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2023

🦋 Changeset detected

Latest commit: 18f508e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@camertron camertron temporarily deployed to preview July 27, 2023 23:24 — with GitHub Actions Inactive
@github-actions github-actions bot added the ruby Pull requests that update Ruby code label Jul 27, 2023
@camertron camertron temporarily deployed to preview July 28, 2023 20:27 — with GitHub Actions Inactive
@camertron camertron temporarily deployed to preview July 28, 2023 20:53 — with GitHub Actions Inactive
@camertron camertron temporarily deployed to github-pages July 28, 2023 20:58 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2023

⚠️ Visual differences found

Our visual comparison tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.

Review visual differences

Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

Nice refactor 👍🏻

app/components/primer/alpha/action_list.rb Show resolved Hide resolved
app/components/primer/alpha/action_list.rb Show resolved Hide resolved
@camertron camertron merged commit 1b8ff1b into main Jul 31, 2023
29 checks passed
@camertron camertron deleted the action_menu_avatar_item branch July 31, 2023 17:22
@primer-css primer-css mentioned this pull request Jul 31, 2023
@camertron camertron mentioned this pull request Aug 2, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor release ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants