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

[Avatar]: When a "link" displays the same in HCM when default and disabled #2236

Closed
Westbrook opened this issue Oct 27, 2023 · 6 comments
Closed
Assignees
Labels
bug Results from a bug in the CSS implementation jira ticket created

Comments

@Westbrook
Copy link
Contributor

Description

Both the default and disabled variants of the Avatar leverage a yellow outline when delivered in HCM.

Feels like this would be related to the fact that <a> elements can't be disabled, so we'd need to delivery synthetic rules to this effect rather than relying on native rules as we might have with a <button>.

Steps to reproduce

  1. Go to https://opensource.adobe.com/spectrum-css/avatar.html
  2. Turn on high contrast mode
  3. Observe both active and disabled avatars have yellow outlines (or the outline appropriate to your version of HCM when a link is active)

Expected behavior

Likely that the disabled Avatar uses the disabled text color, which is green in other contexts.
image

Screenshots

image
@Westbrook Westbrook added the bug Results from a bug in the CSS implementation label Oct 27, 2023
@Westbrook
Copy link
Contributor Author

@jnurthen do you have any suggestions in this area?

@jnurthen
Copy link
Member

If it is disabled it should probably not be rendered as a link. The fact that it takes keyboard focus and changes the hover style is just as much of an issue as the high contrast colour. I don't see any need to change the high contrast colour unless the other issues are also addressed.

@pfulton
Copy link
Collaborator

pfulton commented Oct 30, 2023

@Westbrook @jnurthen Spectrum CSS can remove the link markup from the disabled examples, but downstream consumers would also need to update their markup for this. Does that make sense for us to do, @Westbrook?

@Westbrook
Copy link
Contributor Author

Sounds like a good path here, then there'd be no interactive border and no focus acceptance. Ship it!

@pfulton
Copy link
Collaborator

pfulton commented Oct 30, 2023

Tracking this in Jira via CSS-627

@pfulton
Copy link
Collaborator

pfulton commented Dec 4, 2023

Closed via #2265 - should be available starting in @spectrum-css/avatar@6.0.58

@pfulton pfulton closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Results from a bug in the CSS implementation jira ticket created
Projects
None yet
Development

No branches or pull requests

4 participants