Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^4: Better keyboard-driven navigation, any? (possible)by shmem (Chancellor) |
on Jul 25, 2008 at 00:08 UTC ( [id://700005]=note: print w/replies, xml ) | Need Help?? |
"Vote ++"? Most places at PerlMonks present more than one node to vote on so a "Vote ++" navigation doesn't make much sense to me. That's the key. Why not? if you are reading a specific reply, you know which vote checkbox to press with the mouse to mark a vote, and you don't get confused by the other voting tokens on the page. Mouse navigation allows you to select the appropriate items directly according to the visual context. Key driven navigation is not so difficult. You can have a keystroke for voing (++, 0, --), but a previous keystroke has to establish the context for it, and that keystroke should scroll the context into view. Not that difficult with javascript. Browsers do have (customizable) keystrokes for elements, but "they" don't "know" about the layout of a page and about the contexts therein. So, links are stuffed into a single flat list which can be navigated via <Tab> - not a suitable navigation scheme, if you are way down a page reading replies and have to issue oodles of <Tab> strokes to finally get at the checkbox you want to address. There's no way I know of to select items which are not links. Luckily, PerlMonks pages are organized in a pretty consistent way, so it is easy to define contexts to which to navigate, and with javascript recording the current context, navigation inside that context is easy also. Which brings me back to your question further up: What is "next post"? Well, that depends on context ;) PerlMonks pages are divided into a header (links to sections a.k.a monkbar, introductory words to a page or the OP in a thread), a collection of items (links to nodes contained in sections, or actually posts a.k.a. replies to the OP in the header) and nodelets. Inside the collection of items is the "next post", which is a thing that is already on display but not selectable via a link (the "next post" in Newest Nodes would be the next section); and inside that "post" there may be a link collection which can be navigated with default browser keys. I think you get the idea... I've started to implement key navigation, and currently I'm looking at PM in terms of establishing contexts, sub-contexts and navigation. Viewing things that way might also reveal opportunities to unify and simplify things. --shmem
In Section
Perl Monks Discussion
|
|