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: rework accessibility #2220

Closed
1 task done
ianmcburnie opened this issue Dec 5, 2023 · 0 comments
Closed
1 task done

Avatar: rework accessibility #2220

ianmcburnie opened this issue Dec 5, 2023 · 0 comments

Comments

@ianmcburnie
Copy link
Contributor

ianmcburnie commented Dec 5, 2023

I verified there's no existing issue for this bug.

  • There are no existing issues

Current behavior

The avatar's accessibility label appears to be conveying signed in status & username, but I could argue that it should just simply convey that this a user profile pic, and what type of pic it is (i.e. signed-out, default, custom or ebay). This would create parity with what is onscreen.

Also, for custom image we have an image inside of an image, which doesn't seem right:

<div class="avatar" role="img" aria-label="Signed-in as Doggy">
    <img src="https://ir.ebaystatic.com/cr/v/c01/skin/docs/dog_profile_optimized.jpg" alt="profile pic"/>
</div>

Emptying the alt text would solve the problem.

Expected behavior

I wouldn't expect username to be conveyed in the alt text, as that is not displayed onscreen inside of the image (it is sometimes displayed adjacent as text). I like the way that GitHub employs a tooltip to display the username (and other details) when the avatar is inside of a link,

I would also expect that user's own sign in status can be deduced in the same way a sighted user does it: the presence of the signed out profile pic or not.

I think these changes will help make the avatar more flexible so that it can be used for the current user (which typically also used to deduce sign in status), for other users avatars (where no sign in status is needed) and when placed inside of interactive containers (e.g. buttons & links).

Skin version

Current

@ianmcburnie ianmcburnie added this to the 17.0.0 milestone Dec 5, 2023
@agliga agliga moved this to Todo in eBayUI Dec 6, 2023
@ianmcburnie ianmcburnie self-assigned this Dec 6, 2023
ianmcburnie added a commit that referenced this issue Dec 8, 2023
@ianmcburnie ianmcburnie moved this from Todo to In Progress in eBayUI Dec 10, 2023
@agliga agliga moved this from In Progress to Pull request in eBayUI Dec 14, 2023
@ArtBlue ArtBlue closed this as completed Dec 18, 2023
@github-project-automation github-project-automation bot moved this from Pull request to Done in eBayUI Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants