Skip to content

Fix duplicate Alt+C access keys on Clear history/memory buttons (a11y)#2478

Merged
emmche merged 1 commit into
microsoft:mainfrom
gebrilfradj:fix/access-key-collision-clear-history-memory
Jun 26, 2026
Merged

Fix duplicate Alt+C access keys on Clear history/memory buttons (a11y)#2478
emmche merged 1 commit into
microsoft:mainfrom
gebrilfradj:fix/access-key-collision-clear-history-memory

Conversation

@gebrilfradj

Copy link
Copy Markdown
Contributor

Description

Accessibility Insights flagged a duplicate access key: three controls all declared Alt+C in en-US/Resources.resw:

  • CategoryName_CurrencyAccessKey — Currency converter nav item
  • ClearHistory.AccessKey — Clear all history
  • ClearMemory.AccessKey — Clear all memory

Microsoft accessibility guidelines require access keys to be unique across the visual tree. This PR keeps C for Currency (the natural mnemonic) and assigns unique, mnemonic access keys to the two Clear buttons:

  • ClearHistory.AccessKey: CY (clear historY)
  • ClearMemory.AccessKey: CR (cleaR memory)

Both replacement letters appear in the visible button label, so the underlined mnemonic renders sensibly, and neither collides with any other access key in the resource set or with any Alt-based keyboard accelerator (only Alt+Up/Alt+Down exist).

Only en-US/Resources.resw is changed; the other locale files are updated separately by the localized-strings pipeline, per existing repo convention.

How changes were validated

  • Enumerated every *.AccessKey value in Resources.resw and every hardcoded AccessKey="..." in XAML, grouped by value: C now appears once (Currency), and Y/R each appear once — no duplicates introduced.
  • Confirmed no C++/C#/test code depends on the previous literal values; existing UI tests invoke these buttons by AutomationId (ClearHistoryButton, PanelClearMemoryButton), unaffected by the access-key change.
  • No automated test added: this is a static resource-string uniqueness change with no behavioral surface, consistent with recent resource-only fixes in this repo. Existing CI checks cover the build.

Currency, Clear all history, and Clear all memory all declared access
key "C" in en-US/Resources.resw, which Accessibility Insights flags as a
duplicate access key violation. Keep "C" for Currency and give the two
Clear buttons unique mnemonic access keys:

- ClearHistory.AccessKey: C -> Y (clear historY)
- ClearMemory.AccessKey:  C -> R (cleaR memory)

en-US only; other locales are updated by the localized-strings pipeline.
@gebrilfradj gebrilfradj marked this pull request as ready for review June 26, 2026 06:00
@emmche emmche merged commit 517769b into microsoft:main Jun 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants