Keyboard Shortcuts do not work on 404 page

keyboard

(cpradio) #1

From one of our members

If I follow a link which leads to the “The page you requested doesn’t exist or is private” error page, I can’t use the standard keyboard “Jump to” navigation to return from there.

The only way to navigate from that page is by tabbing.

Discourse “jump to” shortcuts - g/h, g/u, g/c etc.

u for “back” also doesn’t work.

(I couldn’t even get the keyboard “menu” pop-up to work, so that I could check I wasn’t having a brainstorm and muddling up the shortcuts. But I wasn’t. :slight_smile: )

I’ve confirmed that once on an error page, it is difficult (using just a keyboard) to navigate away from it you can’t use any of the standard Discourse shortcuts to navigate away from it.


(Jeff Atwood) #2

Can’t you use the keyboard equivalent for the back button in the browser backspace in that case?

alt+ also works for me.

So your statement that

Doesn’t seem true to me…


(cpradio) #3

That’s great if you want to go back, but if you want to go somewhere specific, good luck.

And up to this point, Discourse has different shortcuts defined for “back” etc. which do not function on that page. Plus @sam requested this be a bug, so I’m putting it back and you two can argue over it. :smile:


(TechnoBear) #4

Yes, alt + left arrow works (although backspace doesn’t).

But that assumes you want to go back to where you were and the chances are very high that I don’t, but that I want to move on. It doesn’t seem unreasonable to expect the keyboard navigation shortcuts to function on every page.


(Jeff Atwood) #5

Can’t you use the tab key to navigate elsewhere on the page?

Also, backspace works fine for me on the 404 page, as does alt+.

Try it here:

http://meta.discourse.org/t/topic-that-dont-exist


(cpradio) #6

Most likely, but it may be difficult to see where your focus is (what link/item is currently selected). However, and more to the point, why does it matter? Are you saying it is a feature to not have the keyboard shortcut work on all pages?

Keyboard shortcuts would be a feature. It was implemented, so feature “complete”. Pages found where keyboard shortcuts are not responding correctly… bug. Yes?


(Jeff Atwood) #7

I guess I view the 404 page as a special page that doesn’t load a lot of the other code we need to render topics, replies, etc. And going back is trivial. Try it yourself with the above link and standard browser keyboard shortcuts that work on every page on the Internet.

Adding a bunch of dependencies to the 404 page can cause extra load, as lots of web spiders hit the 404 pretty hard in many cases for a bunch of different reasons. (although it might not matter if we serve a JS-off version of the 404, I need to check if we do!)

There are some pretty easy standard browser workarounds… tab, alt+, backspace.


(cpradio) #8

I can buy into that concept.

But, if those are pretty standard, why does Discourse break them so badly (or use to)? Try using just those options to access Search results (is this still an issue? yes, yes it is). Maybe part of our problem is now we are accustom to the Discourse shortcuts and are constantly running into pages where they don’t work.


(TechnoBear) #9

Tabbing through multiple links is possible, but a complete pain.

Backspace does not work for me (Firefox 31 on Ubuntu 14.04), although alt + left arrow does. But if I’ve followed a link, it’s because I’m ready to move on from that page and I don’t want to go back.

However, Discourse offers a set of keyboard shortcuts which work from every other page. Users arriving at a 404 page should not have to stop and try to figure out why the shortcuts no longer work and find alternatives; they should just be able to navigate to where they want to go.


(Jeff Atwood) #10

I just objected to your statement that “oh no, I am on the 404 page and now I am trapped! I have absolutely no way to escape this page with my keyboard!” :wink:

Clearly, that is not true. It’s not difficult.

I’m not saying other keyboard shortcuts shouldn’t work here, but the statements in your original post are incorrect. Using the standard built-in browser keyboard shortcuts, you can easily navigate away from the 404 page with your keyboard in the rare event that you land on it. :smile:


(cpradio) #11

Okay, statement “corrected” (since you want to focus on wording versus the implied issue ;))


(Jeff Atwood) #12

Turns out, words matter! Who knew? :wink:


(cpradio) #13

lol. :smile: Maybe we should just start out with that next time and save a few replies back and forth :laughing:


(Jeff Atwood) #14