[PATCH] Automatic assignment of accesskeys

Lubos Lunak l.lunak at suse.cz
Fri Apr 8 14:09:39 BST 2005


 Hello,

 the attached patch tries to automatically assign remaining free accesskeys to 
elements that don't have any (I think things like this have been discussed 
here once or twice already). It finds all possible elements that could use an 
accesskey, then sorts them by priority (things like buttons or checkboxes go 
first because find doesn't work for those), and tries to assign accesskeys to 
them somehow. When viewing accesskeys they're shown in italic.

 It's actually not as good as I though it would be, but I still find it quite 
useful, especially with pages with large forms, like bugs.kde.org ones (find 
doesn't work for form elements, so when working with only keyboard that 
basically means a lot of tabbing). With links it's worse, because the 
algorithm selecting the right accesskey can't do miracles, and as a result 
the assignment is rather random (I tried browsing lists.kde.org with it, and 
'next in thread' was getting 3 different accesskeys for different pages - 
even setting words that will give links higher priority for selecting in 
FallbackAccessKeysPriorityWords= v [HTML Settings] didn't help much). Maybe 
there could be more advanced tricks with detecting the text description of 
the elements, because e.g. checkbox elements don't have any text themselves.

 The list of available accesskeys is limited to 36 characters (A-Z,0-9), which 
is not much and it may look a bit weird on pages with many links, but in fact 
with more the pages would look awfully. Maybe even the 0-9 range should go, 
and maybe this shouldn't work for links at all. Find as you type should be 
better with many links anyway.

 What do you think of it?

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: khtml.patch
Type: text/x-diff
Size: 11767 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050408/b1a29bc4/attachment.patch>


More information about the kfm-devel mailing list