Keyboard navigation and tab-order issues
Just collecting a few issues that I've found when testing keyboard navigation (partially in relation to #713)
The focus location gets "lost" when tabbing through the comment actions list.
Specifically, when focused on the "More..." item, the dropdown appears; pressing tab attempts to focus the first item in the dropdown, but that makes the "More..." button lose focus, hiding the dropdown menu and resetting the focus. A simple fix would be to keep the dropdown visible whenever the focus is within it (which works in my testing).
.dropdown:focus-within .menu {
display: block;
}
Buttons lose focus when activated
I'm not sure what's causing it, but it means that you can't easily uncollapse a comment or unvote on a post without doing Tab, Shift-Tab, Space instead of just hitting Space again.
Implementing comment collapsing with <details>
(#713 (comment 1417499202)) fixes the comment collapsing case, but not the other buttons, so this would still need to be fixed.
It looks like this probably has a number of different causes in different places; voting, bookmarking, or ignoring a post appears to be rebuilding the controls list in a way that loses focus.
The collapse button losing focus appears to have been intentional at some point, as the handler explicitly calls blur
: