Re: Adding visual clues that accesskey exists

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Adding visual clues that accesskey exists
Date: 2023-01-18 11:09:24
Message-ID: 19d3d58f-c77e-4635-3097-875700fa3d4b@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 itself seems 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.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2023-01-18 18:17:27 broken link
Previous Message Laurenz Albe 2023-01-17 08:05:34 Re: The documentation for storage type 'plain' actually allows single byte header