Hi, I think this is less bug and more unexpected behavior…
I’m in the habit on my Mac of using ⌘+Click to open links in new tabs. When I do this on “Keyboard Shortcuts” in the hamburger menu, it opens up a new tab that doesn’t have keyboard shortcuts displayed.
Hi, I understand. I simply wanted to point out that it is unexpected behavior from a user perspective because visually, “Keyboard Shortcuts” looks exactly like a link. If there is some way to offer some affordance that the “open new tab” process won’t work, that’d be ideal. I think this doesn’t need to be prioritized, of course — can’t imagine too many people are encountering this.
FWIW, removing the href attribute entirely (instead of setting to empty string, which is a reference to the current document) should prevent the link from being opened in a new tab, at least in most browsers.
Fair enough, an anchor tag without an href is valid in HTML5.
The problem with removing it is that it would then remove the link from the tab index, which means you can’t reach that link with the keyboard or other alternative input methods.
I feel like this is a slight improvement over opening a new tab, but it still feels odd that nothing happens when I try to open that link in a new tab… especially because it’s the only link in the menu that behaves that way.
We should ideally open the keyboard modal either way. In /widgets/link.js.es6 we have
click(e) {
if (wantsNewWindow(e)) {
return;
}
...
So it looks like we’re preventing anything from happening on click there if it’s calling for a new window/tab?.. I wonder if we can do a little reorganization there so we can open the modal despite modifier keys?