Repository navigation
fix(a11y): name icon-only buttons that only had a tooltip - #1895
Conversation
A tooltip is not an accessible name, so the path bar's copy button, the Back, Forward and Parent folder buttons, the List view's Columns menu, the folder color swatches, the install command copy button, the media play and mute buttons, the archive preview's up button, the chooser's cancel button, the theme search clear button and the sidebar eject and lock buttons were announced without one. Name each after its tooltip through a shared helper that also keeps the name in step when the tooltip changes.
update_active already names the custom color swatch when the bar is built.
Review and cleanupMerged Review against the description and #1860. The claims hold up. Every button listed now sets its tooltip and accessible name through
So the buttons half of the #1860 item is complete. The fields and sliders half stays open, as the description says. There were no earlier review comments to reconcile. Fixes pushed
Tests: kept Comments: the one new doc comment, on Validation
Follow-ups outside this PR
CI: all required checks green on |
Description
#1860 lists icon-only buttons that only get a name from their tooltip. A tooltip is not an accessible name, so a screen reader announced these as unnamed buttons. The new
accessibility::set_tooltip_and_labelsets the tooltip and the accessible name together, and it is applied to every such button I found:I found them by walking the widget tree in Columns, List and Icons, the location editor, Customize and Settings, and by listing every
tooltip_textcall that had no name next to it. The media, archive, chooser and sidebar buttons need states I could not reach in the test window, so those are covered by reading the code only. The inner buttons of aSpinButtonstay unnamed; they belong to GTK.This is the buttons half of the accessible names item. The unnamed text fields and sliders from the same list are a separate change.
Visual evidence
N/A: no visual change.
How to test
./scripts/qa-drive.sh send '{"query":"tree"}'), or a screen reader, in List or Icons view.Expected result: they are named
Back (Alt+←),Forward (Alt+→),Parent folder (Alt+↑)andCopy path. Before this change they had no name.Covered by the QA scenario
icon-only-buttons-named, which fails in every mode on the old code. The other accessibility scenarios and the affected Rust suites pass.Related issue
Part of #1860