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

Make click on reposter's small avatar image go to reposter's account page #2260

Merged

Conversation

ringtailsoftware
Copy link
Contributor

This change makes clicking on the small sized avatar go to the account page for the reposter, previously small and large images both linked to the original poster's account page

@NickColley
Copy link
Collaborator

Love this proposal I've tried to click this myself, I have some blocking feedback related to accessibility that if we can resolve I think this'll be good to go.

@ringtailsoftware
Copy link
Contributor Author

Thanks @NickColley. I've had a play with VoiceOver and I think this is right?

@NickColley
Copy link
Collaborator

Looks great, that aligns with how the main avatar works. Will let @nolanlawson give a final review thank you 👍

@MarcoZehe
Copy link
Contributor

The question is why this link has to be duplicated anyway and then be removed from keyboard and screen reader users afterwards? Is there no better way to construct the markup that doesn't require this horrible hack?

@NickColley
Copy link
Collaborator

@MarcoZehe because the image is in a odd position relative to the link if we did it another way for example expanding the original links hit area we'd run into other issues I suspect so this is preferable. I've used this pattern many times and don't see it as a hack myself but always welcome to better solutions.

@nolanlawson
Copy link
Owner

Yeah that is the solution I already took for the avatar image in general. It's duplicated by the account name, so I considered it pointless to keep it in the tab order or to make it visible for screenreaders. I wrote about my thought process in this post (under "Subtleties with focus management").

The solution @NickColley suggests in #2260 (comment) seems to align with how I've currently handled things.

@nolanlawson
Copy link
Owner

Also FWIW looks like one of the tests is broken due to a selector changing.

@ringtailsoftware
Copy link
Contributor Author

Thanks, I see the broken test in 010-focus.js
I guess the problem is about the normal sized avatar image no longer being the first a.
I don't understand enough to fix it without experimenting, so will need to set up a full dev environment with a Mastodon instance. That may take me a while.

@nolanlawson
Copy link
Owner

Yeah running the tests locally is a beast! I need to learn how Docker works or something.

I took a look, and there were two things:

  1. Changed the selector in the test
  2. There was a true focus bug here – if you click the avatar, then press the back button, the focus is on the author name rather than the avatar image. That's because the IDs were the same. I made the IDs different

This should fix the test; let's let CI figure it out ^

@NickColley
Copy link
Collaborator

@nolanlawson great catch

@nolanlawson nolanlawson merged commit 5eb7183 into nolanlawson:master Nov 27, 2022
alice-werefox pushed a commit to alice-werefox/sema-werefox-cafe that referenced this pull request Apr 3, 2023
…count page (nolanlawson#2260)

Co-authored-by: Nolan Lawson <nolan@nolanlawson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants