You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LR-BEHAV-ACCESS: an icon button's accessible name is its label, with the shortcut as its description - #3253
Off main. From the macOS integration critique (27 Oct), VoiceOver walk-through, item 12.
Problem
Icon-only buttons take their accessible name from their tooltip, and the tooltip carries the shortcut: "Edit (E)", "Presets (Shift+P)", "Photo Grid (G)", "Import Photos… (⌘⇧I)". VoiceOver reads the name every time it lands on the control, so a person walking the tool strip hears the key of every button each time. On macOS the name is the bare label; the shortcut belongs in the help text (AXHelp), which VoiceOver reads after a pause or on request.
Change
widgets::accessible_label splits a trailing key hint off a tooltip ("Edit (E)" → label "Edit", hint "E"; ASCII or full-width brackets, because the Japanese and Traditional Chinese catalogs write "編集(E)") and puts the hint into the widget's AccessKit description. egui's on_hover_text only fills a description that is empty, so the hint stays, and the tooltip a sighted person sees is unchanged. A tooltip with no hint behaves as before.
One helper, two call sites: widgets::icon_button (the tool strip, the bottom bar's view buttons, Before/After and Filmstrip, the mask overlay buttons, White Balance Selector, the slideshow controls, and every other icon-only button) and the top bar's icon loop (Import Photos…). Every call site that passes a tooltip with a hint follows without edits; the Import and Show all overlays tooltips are built from shortcut_text, so the description is the platform's own glyphs ("⌘⇧I" on a Mac), no glyph is hard-coded.
Tests: tool_strip_and_toolbar_buttons_are_named_by_label_with_the_shortcut_as_description and import_button_describes_its_shortcut_as_this_platform_writes_it in crates/ui-egui/tests/it/accessibility.rs; a_trailing_key_hint_leaves_the_name and every_language_names_an_icon_button_by_its_label (all 17 catalogs) in widgets.rs. The Tab-order test found the tool strip by the name "Edit (E)"; it now finds the button named "Edit" whose description is "E" (the menu bar has an "Edit" menu too).
Docs: the LR-BEHAV-ACCESS row, Last updated and a revision row; docs/whats-new.md.
Not in this PR:
Text buttons and check boxes whose visible label contains the key ("Swap Aspect (X)", "Delete (⌫)", "Visualize Spots (A)"): the name has to contain the visible text for Voice Control, so they keep it.
The Japanese cloud-icon tooltip ends in full-width brackets that are not a shortcut ("ローカルのライブラリ(クラウドアカウント不要)"): its name becomes the text before the brackets and the rest is its description, so nothing is lost.
Tests that fail without this change: both tests in accessibility.rs fail on origin/main (seen: a button named "Presets" describing "Shift+P", and a button named "Import Photos…" describing "Ctrl+Shift+I"; the Tab test's strip lookup finds nothing, so "Tab jumps up from Info (I)"). every_language_names_an_icon_button_by_its_label fails against the first version of the splitter that knew only ASCII brackets (assertion on "編集(E)"); all four pass at the head.
User-visible change: ran a release build with the demo library and read the macOS accessibility tree (the computer helper, read only, the app driven through the control channel only). main: AXCheckBox title "Edit (E)", AXHelp "Edit (E)"; "Presets (Shift+P)" / "Presets (Shift+P)"; "Photo Grid (G)" / "Photo Grid (G)"; AXButton "Import Photos… (⌘⇧I)" / "Import Photos… (⌘⇧I)". This branch: "Edit" / AXHelp "E"; "Presets" / "Shift+P"; "Photo Grid" / "G"; "Import Photos…" / "⌘⇧I". No real VoiceOver session was run (it needs a person's screen and keyboard).
Review: a fresh reviewer at 3613a85dcb
Screenshots
None: the painted buttons and their tooltips do not change; only the name and help a screen reader reads do.
Existing edits and libraries: unchanged. Only accessible names and descriptions change; no setting, photo, edit or catalog data.
Shared numbers taken: none.
New dependencies, unsafe, build scripts, network access, spawned processes, deleted files, CI or xtask gate changes: none.
Checklist
No new panic path in non-test code
New text on screen goes through tr() and has its key in crates/ui-egui/locales/*.json: no new text, the tooltips are the existing catalog entries
The feature's row in docs/parity-checklist.md is updated (🟡 stays); docs/gaps.md has no entry for this
New code has a caller
No new assets
Ready to merge
Summary by CodeRabbit
Accessibility
Screen readers now announce icon-only buttons using their labels, with keyboard shortcuts provided separately as descriptions. VoiceOver can read the shortcut after a pause or on request.
This behavior applies across supported languages, including Japanese and Traditional Chinese. Hover tooltips remain unchanged.
Reviewing files that changed from the base of the PR and between 59a5d00 and 3613a85.
Files selected for processing: 5
crates/ui-egui/src/panels/topbar.rs
crates/ui-egui/src/widgets.rs
crates/ui-egui/tests/it/accessibility.rs
docs/parity-checklist.md
docs/whats-new.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Walkthrough
Icon buttons now use their bare labels as accessible names and expose trailing shortcut hints as descriptions. Top-bar icons announce the accessible label. Hover tooltips remain unchanged. Tests and documentation cover the updated behavior.
Changes: Icon Button Accessibility
Layer / File(s)
Summary
Accessible names and shortcut descriptions crates/ui-egui/src/widgets.rs, crates/ui-egui/src/panels/topbar.rs, crates/ui-egui/tests/it/accessibility.rs, docs/parity-checklist.md, docs/whats-new.md
Icon buttons use the bare label as the accessible name and a trailing shortcut hint as the AccessKit description. Top-bar icons announce the accessible label while retaining the translated hover tooltip. Tests check shortcut descriptions, including the platform-specific Import Photos shortcut. Documentation records the updated behavior.
storytold/wordcraft issue 3164: This change names icon-only toolbar buttons, while the issue also tracks other unnamed controls.
storytold/wordcraft issue 3477: This change adds accessible names and separate shortcut descriptions for icon-only toolbar controls, while the issue tracks additional unnamed controls.
Suggested reviewers:aiongg
Merge Risk: Minimal · up to 3613a
Icon buttons expose shortcut hints separately while retaining hover text. No merge-blocking issue was identified.
Security architecture risk: Minimal · up to 3613a
The change reorganizes accessibility text without changing which actions buttons can perform or when they are enabled. No material security risk was identified in the reviewed changes.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The demonstrated effect is limited to accessibility metadata for existing desktop controls. The inspected delta does not expand the set of executable actions or grant additional authority through tooltip content.
Trust Boundaries and Controls
observed — Icon buttons retain their enabled-dependent interaction sense and enabled/selected metadata. The top-bar loop retains its existing widget identity and click-to-command dispatch. The new label processing does not replace those controls.
Resilience and Maintainability Implications
inferred — The metadata update is scoped to the response ID and does not introduce a persistent transition or recovery workflow. The earlier source inspection reports that egui clears AccessKit state at each UI pass, so removing a shortcut should not leave a prior hint on the rebuilt node.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: icon buttons use their label as the accessible name and the shortcut as the description.
Docstring Coverage
Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 8 functions across 3 files. (2 skipped: 2 unsupported.)
Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
Clippy (1.99.0)
Clippy execution timed out
Comment @coderabbitai help to get the list of available commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Off
main. From the macOS integration critique (27 Oct), VoiceOver walk-through, item 12.Problem
Icon-only buttons take their accessible name from their tooltip, and the tooltip carries the shortcut: "Edit (E)", "Presets (Shift+P)", "Photo Grid (G)", "Import Photos… (⌘⇧I)". VoiceOver reads the name every time it lands on the control, so a person walking the tool strip hears the key of every button each time. On macOS the name is the bare label; the shortcut belongs in the help text (
AXHelp), which VoiceOver reads after a pause or on request.Change
widgets::accessible_labelsplits a trailing key hint off a tooltip ("Edit (E)" → label "Edit", hint "E"; ASCII or full-width brackets, because the Japanese and Traditional Chinese catalogs write "編集(E)") and puts the hint into the widget's AccessKit description. egui'son_hover_textonly fills a description that is empty, so the hint stays, and the tooltip a sighted person sees is unchanged. A tooltip with no hint behaves as before.widgets::icon_button(the tool strip, the bottom bar's view buttons, Before/After and Filmstrip, the mask overlay buttons, White Balance Selector, the slideshow controls, and every other icon-only button) and the top bar's icon loop (Import Photos…). Every call site that passes a tooltip with a hint follows without edits; the Import and Show all overlays tooltips are built fromshortcut_text, so the description is the platform's own glyphs ("⌘⇧I" on a Mac), no glyph is hard-coded.tool_strip_and_toolbar_buttons_are_named_by_label_with_the_shortcut_as_descriptionandimport_button_describes_its_shortcut_as_this_platform_writes_itincrates/ui-egui/tests/it/accessibility.rs;a_trailing_key_hint_leaves_the_nameandevery_language_names_an_icon_button_by_its_label(all 17 catalogs) inwidgets.rs. The Tab-order test found the tool strip by the name "Edit (E)"; it now finds the button named "Edit" whose description is "E" (the menu bar has an "Edit" menu too).LR-BEHAV-ACCESSrow, Last updated and a revision row;docs/whats-new.md.Not in this PR:
How it was checked
cargo xtask cipasses on this branch (3613a85dcb,cargo xtask cithrough the draft-branch wrapper: all 8 steps, 5,250 tests passed, 0 failed), with MENU-BAR: clippy passes on macOS again (Quit, About and Settings share one branch) #2973's one-file clippy fix forapps/lightcraft/src/native_menu.rs:492applied uncommitted and reverted before pushing (mainfails that lint, MENU-BAR: clippy passes on macOS again (Quit, About and Settings share one branch) #2973). An earlier run of this branch stopped attests::slideshow::a_manual_slideshow_waits_for_the_arrow_keys(a layout-shift flake in Settings that this PR does not touch; my LRC-SS-LAYOUT: the Slideshow settings page no longer moves when the slide preview finishes rendering #2848 fixes it); the rerun at the head above passed.accessibility.rsfail onorigin/main(seen:a button named "Presets" describing "Shift+P", anda button named "Import Photos…" describing "Ctrl+Shift+I"; the Tab test's strip lookup finds nothing, so "Tab jumps up from Info (I)").every_language_names_an_icon_button_by_its_labelfails against the first version of the splitter that knew only ASCII brackets (assertion on "編集(E)"); all four pass at the head.computerhelper, read only, the app driven through the control channel only).main:AXCheckBoxtitle "Edit (E)",AXHelp"Edit (E)"; "Presets (Shift+P)" / "Presets (Shift+P)"; "Photo Grid (G)" / "Photo Grid (G)";AXButton"Import Photos… (⌘⇧I)" / "Import Photos… (⌘⇧I)". This branch: "Edit" /AXHelp"E"; "Presets" / "Shift+P"; "Photo Grid" / "G"; "Import Photos…" / "⌘⇧I". No real VoiceOver session was run (it needs a person's screen and keyboard).3613a85dcbScreenshots
None: the painted buttons and their tooltips do not change; only the name and help a screen reader reads do.
Merging
shortcut_textreturns, so the two combine.unsafe, build scripts, network access, spawned processes, deleted files, CI orxtaskgate changes: none.Checklist
tr()and has its key incrates/ui-egui/locales/*.json: no new text, the tooltips are the existing catalog entriesdocs/parity-checklist.mdis updated (🟡 stays);docs/gaps.mdhas no entry for thisSummary by CodeRabbit