Adding visual clues that accesskey exists

2023-01-13 Thread Corey Huinker
Today I discovered that we already have accesskey support for navigation of
our documentation. And it's been there since at least 2007, according to
the mailing list archives.

I discovered this accidentally, because I was researching something and
just instinctively hit the right arrow in the vain hope that it was somehow
linked to the "Next" link.

Doing a view source on the page, I found the access keys: h = home, u = up,
n = next, p = previous. That's great, and easy to remember for English
speakers, everyone else less so. Accesskeys are primarily discovered via
screen readers, so this isn't a huge problem, but having something language
independent would be a nice touch. As far as I know, accesskeys cannot be
the arrow keys.

Accesskeys seem to have universal support (at least: Chrome, Edge, Firefox,
Safari, Opera) now according to
https://www.w3schools.com/tags/att_global_accesskey.asp but, as the page
says, they are not recommended largely because desktops and browsers tend
to reuse these keys.

I would like to make this feature more discoverable and useful. Some ideas,
in increasing order of complexity, are:

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
. 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 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.

Thoughts?


archive_command was duplicated in backup.sgml

2023-01-13 Thread Noboru Saito
Hi,
archive_command was written twice in backup.sgml.

diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 8bab521718..be05a33205 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -956,8 +956,7 @@ SELECT * FROM pg_backup_stop(wait_for_archive => true);
  On a standby, archive_mode must be
always in order
  for pg_backup_stop to wait.
  Archiving of these files happens automatically since you have
- already configured archive_command or
archive_library or
- archive_command.
+ already configured archive_command or
archive_library.
  In most cases this happens quickly, but you are advised to monitor your
  archive system to ensure there are no delays.
  If the archive process has fallen behind because of failures of the
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 8bab521718..be05a33205 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -956,8 +956,7 @@ SELECT * FROM pg_backup_stop(wait_for_archive => true);
  On a standby, archive_mode must be always in order
  for pg_backup_stop to wait.
  Archiving of these files happens automatically since you have
- already configured archive_command or archive_library or
- archive_command.
+ already configured archive_command or archive_library.
  In most cases this happens quickly, but you are advised to monitor your
  archive system to ensure there are no delays.
  If the archive process has fallen behind because of failures of the