Skip to content
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

fix: better align access keys with the guidelines #843

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

smileyhead
Copy link
Contributor

@smileyhead smileyhead commented Mar 7, 2025

Summary

Resolves #678.

Based on Microsoft's guidelines, I have…

  • added access keys (mnemonics) to all menu items and some buttons which I found were missing them
  • moved the position of existing mnemonics where needed
  • created new strings where a mnemonic was needed for only one instance of that string
  • created new strings specifically in the New Tag window to replace the generic ‘+’ buttons with something more descriptive that allows for mnemonics
  • created strings and added labels to the main window drop-downs to allow for mnemonics
  • created links (buddies) between labels and corresponding UI elements to allow for mnemonics
  • modified the File -> Open Recent list to prefix numbers in front of the directory paths, which allow for mnemonics

Unresolved issues:

  • I would have liked to create a mnemonic for the ‘Color’ label in the New Tag window that activates the button below it. The buddy has been defined, but it does not work and I do not know why.
  • The search box cannot be added mnemonics to directly and I am unsure on how to proceed (see this comment for more info)
  • Some actions (Apply, Delete, Edit, Overwrite, Rename, Skip) have two versions, with the ‘_alt’ versions having access keys defined and the normal versions not. I would advise removing the access key-less variations (especially for Apply and Done).
    • On the other hand, Cancel also has an ‘_alt’ version with an access key that should be removed, as the Cancel action always has Esc hard-mapped as its access key.
    • Similarly, Done should not have a mnemonic, as its function is to just close a window, and so Esc would suffice. (I have taken the liberty to remove the mnemonic from the alt version of this string, since it was conflicting with something else.)

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

@CyanVoxel CyanVoxel added Type: Bug Something isn't working as intended Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience Type: Translation Translates or improves translation capabilities Priority: Medium An issue that shouldn't be be saved for last Status: Review Needed A review of this is needed Status: Blocked This issue or pull request is awaiting the outcome of another issue or pull request labels Mar 7, 2025
@CyanVoxel CyanVoxel added this to the Alpha v9.5.2 milestone Mar 7, 2025
@smileyhead
Copy link
Contributor Author

While looking into adding mnemonics to the search bar in the main window, I have discovered that adding them to a QLineEdit element directly is, unfortunately, not supported.

We might consider adding a shortcut key to focus on the text box (Ctrl + F, for instance) and signal this in the placeholder text (‘Search Entries ({shortcut})’), but that is out of scope for this PR. Alternatively, we could add a buddied QLabel in front of the search box, something like ‘Search Entries:’, but I do not wish to do that without prior approval.

@smileyhead
Copy link
Contributor Author

I apologise; I realised I have made this PR too soon, as there are still more commits I wish to make. I will reopen this when I am done.

@smileyhead smileyhead closed this Mar 8, 2025
@smileyhead
Copy link
Contributor Author

I have made all the modifications I wanted and updated the PR to reflect that. It is now ready for review.

@smileyhead smileyhead reopened this Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium An issue that shouldn't be be saved for last Status: Blocked This issue or pull request is awaiting the outcome of another issue or pull request Status: Review Needed A review of this is needed Type: Bug Something isn't working as intended Type: QoL A quality of life (QoL) enhancement or suggestion Type: Translation Translates or improves translation capabilities Type: UI/UX User interface and/or user experience
Projects
Status: 🏓 Ready for Review
Development

Successfully merging this pull request may close these issues.

[Bug]: Access keys (mnemonics) breaking guidelines
2 participants