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(avatar): a11y changes (#2220) #2226

Merged
merged 3 commits into from
Dec 15, 2023
Merged

feat(avatar): a11y changes (#2220) #2226

merged 3 commits into from
Dec 15, 2023

Conversation

ianmcburnie
Copy link
Contributor

@ianmcburnie ianmcburnie commented Dec 10, 2023

Fixes #2220

  • This PR contains CSS changes
  • This PR does not contain CSS changes

PLEASE SQUASH.

Description

Having the sign in status hardcoded in the examples was problematic as the avatars are not always used for the current user.

The custom image avatar had alt text on the nested image, it makes more sense to consolidate the alt text on the root tag to be consistent across avatars.

Notes

For the default avatar, I placed the letter inside of a span element. This gives us a little more flexibility for ARIA in future (i.e. incase we decide to move the role=img and aria-label onto the nested element).

The vertical alignment in production looks a little off. I did not try and fix that in this PR.

We'll need to make some minor changes on ebayui-core side.

Screenshots

Before

Screenshot 2023-12-08 at 12 36 37 PM Screenshot 2023-12-08 at 12 36 46 PM

After

Screenshot 2023-12-09 at 6 44 21 PM Screenshot 2023-12-10 at 10 10 30 PM

Checklist

  • I verify the build is in a non-broken state
  • I verify all changes are within scope of the linked issue
  • I regenerated all CSS files under dist folder
  • I tested the UI in all supported browsers
  • I did a visual regression check of the components impacted by doing a Percy build and approved the build
  • I tested the UI in dark mode and RTL mode
  • I added/updated/removed Storybook coverage as appropriate

@agliga agliga merged commit fbc42ef into 17.0.0 Dec 15, 2023
2 checks passed
@agliga agliga deleted the 2220-avatar-a11y branch December 15, 2023 21:28
ArtBlue pushed a commit that referenced this pull request Dec 27, 2023
agliga pushed a commit that referenced this pull request Dec 28, 2023
@agliga agliga mentioned this pull request Feb 11, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants