Frank, Sebastian, List :)
This is a good idea. Having the spaces inside links highlighted and the whole kbd. nav. current link in a distinctive pattern or color
I have used Sebastian's patch for a while now, let my GF try it, and we are unanimous: looks much nicer ('more professional'), but is less useable (hard to see where focus is). The next version of the patch will use both color and a frame for focus highlight.
Good!
One thing I noticed between kbd1 and kbd2 is that sometimes the latter makes odd jumps when using UP and DOWN keys. For instance with "gtk-types.html" page from GTK+'s manual.
What problem are you referring to? I tried that page (both for the GTK+-1.2 and GTK+-2.2 manuals), and it reacted the way I would expect it to (down goes down a link, up takes focus one link up). Completely predictable and consistent. Which does not surprise me, as this is a relatively 'easy' page with many links to choose from.
Yesterday it took me some time to produce an odd behaviour. I didn't know then that user link navigation influenced how links are passed through, so I assumed a bug. You've already noticed some other glitches (as going from the first link to the one to the right when pressing DOWN), but yesterday (and again today) I managed to get into a situation where going from one link down to another and up again (using UP/DOWN), skipped several links placed in between. Unfortunately I don't know how to reproduce it... One interesting thing that may hint how to reproduce this is that it is possible to change (program to some extent) which link is selected for an up or down jump. i.e. it is not always the same. For instance: placing the nav cursor in the [gtk_type_new] link inside the "struct GtkTypeObject" section and pressing DOWN, brings the cursor to the leftmost [GtkType] under gtk_type_unique but it is possible to get to the leftmost [GtkType] too! That is focusing the leftmost one, then going UP then DOWN again. Maybe all these little glitches will be wiped out with the new link selection algorithm, I don't know...
The places where I see inconsistent behaviour are mostly:
- going UP in a page with few links sometimes takes me DOWN instead... This is caused by the fact that links which have not yet been displayed have their location set to '0,0'. The 'UP' code tries to find a link with a lower y-coordinate than the current cursor. The solution is probably to give such 'unknown' links a recognizable location (-1,-1) and ignore them for positional navigation. - sometimes a link is highlit when I did not ask for it (eg. first page of Google search results). Have to look in to this. - sometimes focus cycles to the top of the document when pressing 'DOWN' on the last link on the page. This should not happen. Cause probably the same as above. - it is currently not possible to use Tab to focus the next frame in a frameset. This is clearly a bug...
The "directional" navigation of links feels very handy and intuitive. One thing that can be improved is when the current link is outside the screen not to jump to it upon a key press but to find the most appropriate one within the displayed area. This would allow for a smooth keyboard navigation by integrating with the scrolling keys.
Ah, but what about those cases where there are no links inside the displayed area? This happens quite often, eg. the 'next/prev' links on the top and bottom of a document generated with LaTeX2html (and such). This is actually what made me notice the problem in the first place.
If there are no links inside the displayed area, jump to next one then! (just as it is now). The gain I see with this scheme is that you can scroll down a page, and when you find an interesting link "call" the keyboard navigation cursor and quickly select the link. Otherwise you're carried to the top of the page (or to wherever the cursor was left) and will have to start finding the scrolled region where the to-be-clicked link is.
I think that in these cases, 'sequential' focus (just take the next link from the document source) is the best compromise between useability and performance. To really solve this problem, the document would have to be pre-rendered once to learn the location of all links. That is to big a sacrifice for to little gain I think. [LIST: what do you think?]
Yes, in case it is too complex to find whether a link is currently upon display (and also one that is), it may be not worth. Maybe Sebastian knows of a not too costly way. Sebastian? Cheers Jorge.-