Skip to content

fix(avatars): status ring styling and accessibility #2022

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

Merged
merged 5 commits into from
Jun 2, 2025

Conversation

jzempel
Copy link
Member

@jzempel jzempel commented May 30, 2025

Description

This PR addresses two problems with the Avatar component:

  • missing box-shadow status ring (due to stricter & reference with styled-components v7)
  • problematic statusLabel accessibility structure detailed in the image below

Detail

Screenshot 2025-05-30 at 3 26 16 PM

Checklist

  • 👌 design updates will be Garden Designer approved (add the designer as a reviewer)
  • 🌐 demo is up-to-date (npm start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • ⚫ renders as expected in dark mode
  • 🤘 renders as expected with Bedrock CSS (?bedrock)
  • 💂‍♂️ includes new unit tests. Maintain existing coverage (always >= 96%)
  • ♿ tested for WCAG 2.1 AA accessibility compliance
  • 📝 tested in Chrome, Firefox, Safari, and Edge

@jzempel jzempel requested a review from a team as a code owner May 30, 2025 20:41
@jzempel jzempel changed the title Jzempel/avatar fixes fix(avatars): status ring styling and accessibility May 30, 2025
{computedStatus === 'transfers' ? (
<ArrowLeftIcon data-icon-status={computedStatus} />
) : null}
{computedStatus === 'away' ? <ClockIcon /> : null}
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't data-icon-status needed?

&[data-icon-status='transfers'] {
transform: scale(${props.theme.rtl ? -1 : 1}, 1);
}
/* stylelint-disable-next-line selector-no-qualifying-type */
&[data-icon-status='away'] circle {
display: none; /* [1] */
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good catch

@jzempel jzempel merged commit ca92c4b into main Jun 2, 2025
7 checks passed
@jzempel jzempel deleted the jzempel/avatar-fixes branch June 2, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants