Set focus on usercard when activated by keyboard

Continuing the discussion from New user cards and user profile page design deployed:

[quote=“codinghorror, post:27, topic:21660”]
<s>We could just remove the Profile button, under the assumption that people know to click the name / avatar to get the full user page?</s>

This is now done. Get to profile by clicking / tapping the big user avatar or name on the expanded card.
[/quote]If the usercard is activated by keyboard, it is currently necessary to tab through the entire topic before focus comes to the card, allowing access to the profile page.


Can you take this @eviltrout?

Here, this should help :smile:


Something has massively regressed. Using j/k to select a post and then pressing tab no longer sets the focus to the avatar/username (for me at least here on meta).

I still can’t tab into a UserCard either…

Windows 7 Chrome 38

Same here - although it’s working on SitePoint (probably until the next upgrade?). Firefox 33 on Ubuntu Gnome 14.04.

Weird I’ll look into this ASAP

I can’t verify it is directly related to your changeset, it may be another one involved too, but something happened, and it happened recently. I’ll try looking at some commits in about 20 minutes or so to see if I can find it too. Found it.

Seems to be this change:


Thanks for tracking that down. I’ve got a fix:


Interesting… I wouldn’t have thought of a href attribute without any value would fix this. I’ll give it another test in an hour or so here on Meta (how often does Meta get updated?)

If tests pass, commits usually end up on meta in less than 15 minutes. I tested locally and that indeed fixes the problem :smile:


Cool, that’s good info to have :smile:

I don’t doubt that at all, I’m just really surprised that it works, so it is sort of: “I have to see this with my own two eyes” type of thing :smile:

Oh I don’t mind second guessing what I see!

hat really helps keeping the quality of our software high, as I miss little details all the time.

Confirmed as working on Windows 7 Chrome 38. Thanks for the quick fix and the lesson on afterRender :wink: I may use that to solve a few other keyboard related issues that I’ve put on the back-burner for now.

1 Like