Re: Adding visual clues that accesskey exists
От | Peter Eisentraut |
---|---|
Тема | Re: Adding visual clues that accesskey exists |
Дата | |
Msg-id | 19d3d58f-c77e-4635-3097-875700fa3d4b@enterprisedb.com обсуждение исходный текст |
Ответ на | Adding visual clues that accesskey exists (Corey Huinker <corey.huinker@gmail.com>) |
Ответы |
Re: Adding visual clues that accesskey exists
|
Список | pgsql-docs |
On 13.01.23 23:07, Corey Huinker wrote: > 1. Add static hints to each link, so "Next" becomes "Next [n]". Fairly > simple, but visually clumsy, and it might not actually clue the user > that they need to hit ALT+n, not just "n". This chrome extension is an > example of how it might look > https://chrome.google.com/webstore/detail/display-access-keys/gpicedcgegaokienkdbbcagodgacpbpd?hl=en <https://chrome.google.com/webstore/detail/display-access-keys/gpicedcgegaokienkdbbcagodgacpbpd?hl=en>. The extension itselfseems stale if not completely abandoned, but the screenshot gives a good visual representation. > > 2. Add the hint to the hovertext of the link. So, for example on > https://www.postgresql.org/docs/current/libpq-exec.html > <https://www.postgresql.org/docs/current/libpq-exec.html> the Hovertext > for the "Next" link would become: "34.4 Asynchronous Command Processing > [ALT+n]". This would lead to more accidental discovery, but wouldn't > alter the existing static page appearance. > > 3. Add hotkey that launches an overlay which displays all available > keyboard shortcuts. A common example of this is typing '?' in gmail or > any other google web app. > > 4. Actually implement arrow keys with javascript, but leave the > accesskeys as-is. I'm not a front-end programmer of any great skill, but > it should be easy to capture the keydown event, filter for > ArrowUp/ArrowLeft/ArrowRight, and then either search the DOM for the > anchor with the corresponding accesskey, or rely on element ids > (example: "nav-left", "nav-up", "nav-right") to find the anchor and > invoke a .click() on it. Currently the navigation anchors do not have > IDs, but adding them for this purpose might close us off from a future use. I agree that hot key discoverability could be better, but I don't think this is an issue in the PostgreSQL documentation; it's something the browser should handle. The job of the HTML markup is to declare the key -- then it's up to the browser how to present it. Otherwise, every single web page in the world (well, those with hot keys) would have to repeat this analysis, which seems on the wrong level to me.
В списке pgsql-docs по дате отправления: