-
Notifications
You must be signed in to change notification settings - Fork 17
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
handle alt text overflow on broken avatar images #81
Conversation
Nice! It also looks like this change improves the chromium experience as well, so a benefit for both! I guess one thing to check is when there IS an avatar found, does this break anything? I see you have this listed as draft, but I wouldn't hesitate to promote it to "ready for review" once you're comfortable with the changes. I don't think we need to exhaustively test each available browser, the big 2 are at least covered by your before and after. |
I guess I'm wondering if I've been running with Edit: My goal with this change is to not effect accessibility or SEO. From my understanding the change doesn't, but I'm not a super expert at that stuff so if other people notice any reason it would, would appreciate the information |
this one's more of a personal opinion and quite firefox centric but maybe the alt text doesn't need to be hidden? also you might want to check for other places that uses avatar and apply similar fixes where appropriate, like in user hover info box or in the user's page for example. |
move display and overflow settings to include all avatars remove hiding of alt text
I definitely might need more eyes on this change than the last one as it's quite different from what I've been running, especially whether the user style sheet is included on all pages... I mean it looks like it just imports all of them but just to be sure. So there exists a |
translate alt text on notifications panel
must have overlooked it while fixing translation
I've added the class everywhere I see I think the overflow problem might occur for magazine icons as well, but feel like that should be a separate PR |
although this is not strictly about user avatar image but it looks like user cover image in their profile page could also use this fix. .user-box .with-cover.with-avatar .cover {
display: block;
overflow: hidden;
} the rest seems to be looking fine, from what I can see. |
Would it be acceptable to make the user cover and magazine icons their own PRs just to keep the change set small and easy to revert? (I took a quick look and am a little confused with what classes are added in what situation for cover, so want to make sure I get it right, which might take more time. I also am wondering, I see mastodon just has a blanket |
that should be fine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, @nobodyatroot what do you think?
Agreed, looks good to me as well! |
mainly in firefox, if mbin was unable to fetch the avatar image and it displays a broken image, a single letter column spans the entire length of the alt text.
left chromium, right firefox:
I found out this was because
max-width/max-height/width/height
aren't used ondisplay: inline
elementsfollowing some answers here and here, changed it to
inline-block
and hide the alt text, which shouldn't effect screenreaders to my understanding of the answersleft chromium, right firefox:
EDIT: look below for how it looks now, decision was to not hide alt text completely to differentiate between broken images and no avatar
might need more testing on mobile / other browsers if this makes sense