Skip to content

Commit 49d4e99

Browse files
skjnldsvclaude
andcommitted
fix(a11y): split compound kbd shortcuts into individual key elements
Each key in a shortcut combo now has its own :kbd: role (e.g. :kbd:`Ctrl`+:kbd:`F` instead of :kbd:`Ctrl+F`) for correct semantic HTML. Also adds 1px block margin to kbd for visual breathing room, and updates the style guide example accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
1 parent 9494926 commit 49d4e99

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

_shared_assets/static/custom.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ button.rst-current-version {
135135
kbd {
136136
color: #c0392b !important;
137137
border-color: #767676 !important;
138+
margin-block: 1px;
138139
}
139140

140141
/* Inline code — RTD uses #e74c3c on white which gives ~3.82:1, below

admin_manual/desktop/troubleshooting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Another way to obtain the client log file:
170170

171171
1. Open the Nextcloud Desktop Client.
172172

173-
2. Press :kbd:`F12` or :kbd:`Ctrl+L` on your keyboard.
173+
2. Press :kbd:`F12` or :kbd:`Ctrl`+:kbd:`L` on your keyboard.
174174

175175
The Log Output window opens.
176176

style_guide.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,10 @@ page moves.
326326
Click :guilabel:`Save` to confirm.
327327

328328
``:kbd:``
329-
Use for keyboard shortcuts::
329+
Use for keyboard shortcuts. Each key gets its own ``:kbd:`` role, with the
330+
separator character outside::
330331

331-
Press :kbd:`Ctrl+S` to save.
332+
Press :kbd:`Ctrl`+:kbd:`S` to save.
332333

333334
``:file:``
334335
Use for file paths to ensure consistent rendering::

user_manual/universal_access.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ Navigating via keyboard
2727

2828
You can navigate the web interface with a keyboard, just as you would with a mouse:
2929

30-
* :kbd:`Tab` and :kbd:`Shift+Tab` to move between elements
30+
* :kbd:`Tab` and :kbd:`Shift`+:kbd:`Tab` to move between elements
3131
* :kbd:`Enter` or :kbd:`Space` to activate or open the element (depending on the type of element)
3232
* :kbd:`Escape` to be used to close modals, popover menus, and file viewers
3333
* :kbd:`Left arrow` and :kbd:`Right arrow` to navigate between photos in the viewer
34-
* :kbd:`Ctrl+F` to focus the search field
35-
* :kbd:`Ctrl+S` to save changes in editors like Nextcloud Text
34+
* :kbd:`Ctrl`+:kbd:`F` to focus the search field
35+
* :kbd:`Ctrl`+:kbd:`S` to save changes in editors like Nextcloud Text
3636

3737
For quicker navigation, we offer two "skip links" at the beginning of the document which allow you to:
3838

@@ -58,7 +58,7 @@ Nextcloud Mail has shortcuts as well, also documented inside the settings of the
5858
* :kbd:`S` to toggle a message as favorite
5959
* :kbd:`U` to toggle a message unread
6060
* :kbd:`Del` to delete a message
61-
* :kbd:`Ctrl+Enter` to send
61+
* :kbd:`Ctrl`+:kbd:`Enter` to send
6262
* :kbd:`R` to refresh and load new mails
6363

6464

0 commit comments

Comments
 (0)