Skip to content

UX: Consistency and accessibility improvements for keyboard shortcuts #34090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 8, 2025

Conversation

martin-brennan
Copy link
Contributor

@martin-brennan martin-brennan commented Aug 5, 2025

  • Apply these rules to the display of all keyboard shortcuts in the app:
    • No shortcuts show a + between keys
    • On Windows and Linux, show Ctrl and Alt words, but show ⇧ for Shift
    • On macOS, show ⌃ for Control, ⌘ for Command, ⌥ for Option, and ⇧ for Shift
    • Use capital letters for the shortcut keys, e.g. Ctrl+S instead of Ctrl+s
  • Add a filter to the keyboard shortcut help modal to allow searching
  • Add aria-keyshortcuts attributes to the keyboard shortcuts in the composer
    toolbar and popup menu options
  • Adds Ctrl+Enter + Esc shortcuts for composer
image

@github-actions github-actions bot added chat PRs which include a change to Chat plugin i18n PRs which update English locale files or i18n related code poll discourse-details spoiler-alert labels Aug 5, 2025
@martin-brennan martin-brennan force-pushed the ux/keyboard-shortcut-consistency branch from 2f4f626 to 82e55b0 Compare August 5, 2025 05:37
* Apply these rules to the display of all keyboard shortcuts in the app:
  * No shortcuts show a + between keys
  * On Windows and Linux, show Ctrl and Alt words, but show ⇧ for Shift
  * On macOS, show ⌃ for Control, ⌘ for Command, ⌥ for Option, and ⇧ for Shift
  * Use capital letters for the shortcut keys, e.g. Ctrl+S instead of Ctrl+s
* Add a filter to the keyboard shortcut help modal to allow searching
* Add aria-keyshortcuts attributes to the keyboard shortcuts in the composer
  toolbar and popup menu options
@martin-brennan martin-brennan force-pushed the ux/keyboard-shortcut-consistency branch from 82e55b0 to 89f3228 Compare August 5, 2025 05:41
@martin-brennan martin-brennan marked this pull request as ready for review August 6, 2025 02:09
@renato
Copy link
Contributor

renato commented Aug 6, 2025

I know it's not from your PR, but "Return to composer" with a Shift C... no idea what that is 🤔

…-shortcuts-help.gjs

Co-authored-by: Renato Atilio <renato@discourse.org>
@martin-brennan
Copy link
Contributor Author

Ah @renato it focuses the composer input, but it doesn't work for rich editor because of this hardcoded selector :)

_focusAndInsertText(insertText) {
next(() => document.querySelector("textarea.d-editor-input")?.focus());
if (insertText) {
this.model.appendText(insertText, null, { new_line: true });
}
}

Will fix this up

@martin-brennan martin-brennan merged commit 9146986 into main Aug 8, 2025
16 of 17 checks passed
@martin-brennan martin-brennan deleted the ux/keyboard-shortcut-consistency branch August 8, 2025 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat PRs which include a change to Chat plugin discourse-ai discourse-details i18n PRs which update English locale files or i18n related code poll spoiler-alert
Development

Successfully merging this pull request may close these issues.

2 participants