[Bug] The accessible-name test covers 6 of 26 editors; 24 buttons have no accessible name #586

Closed
opened 2026-07-22 16:16:36 +00:00 by brenno · 1 comment
Owner

Found in the pre-publication accessibility review, verified empirically.

Evidence: test/accessibility_labels_test.dart imports exactly six widgets (Bullets, Table, Timeline, TwoImages, SignOff, Video) out of 26 *_editor.dart files in lib/widgets/editors/, zero of the 41 dialogs in lib/widgets/dialogs/, and zero of presentation mode.

Counted across lib/: 122 IconButtons, of which 24 have no tooltip: parameter, all in the pattern Tooltip(message: …, child: IconButton(…)) — which does not produce an accessible name. Verified with a throwaway test reusing the existing unnamedButtons() helper: Tooltip(child: IconButton(...)) yields [unnamed Rect.fromLTRB(0,0,48,48)]; IconButton(tooltip: …) yields [].

Where they are: app_shell_main_layout.dart (7), panels/preview_panel.dart (4, zoom and collapse), panels/editor_panel_controls.dart (2), presentation/parts/presenter_overlays.dart (4, including the exit button and the grid close button), presentation/parts/presenter_ink.dart (3, the entire drawing toolbar), plus slide_list_panel_bars.dart, duplicate_cleanup_dialog.dart, new_deck_dialog.dart, presentation_info_dialog.dart.

Why this must be fixed before publication: README.md:42 and docs/ACCESSIBILITY.md sell "a test that fails the build when a button has no accessible name" as the proof that the accessibility claim is a claim and not a hope. That test covers six widgets; across the rest of the app the very fault it guards against stands 24 times, including the drawing layer and the button you use to leave a presentation. Someone opening the app with VoiceOver hears "button" on the exit control — and that is the first bug an accessibility reviewer reports publicly.

Proposal: (1) convert the 24 from Tooltip(child: IconButton(…)) to IconButton(tooltip: …) — mechanical, the text already exists and already goes through d(). (2) Add a source scan to test/accessibility_labels_test.dart forbidding Tooltip( wrapped directly around an IconButton(, which is far cheaper than pumping each of the 41 dialogs. (3) Until wider coverage exists, state in docs/ACCESSIBILITY.md how much the test covers, not merely that it exists.

Found in the pre-publication accessibility review, verified empirically. **Evidence:** `test/accessibility_labels_test.dart` imports exactly six widgets (Bullets, Table, Timeline, TwoImages, SignOff, Video) out of 26 `*_editor.dart` files in `lib/widgets/editors/`, zero of the 41 dialogs in `lib/widgets/dialogs/`, and zero of presentation mode. Counted across `lib/`: 122 `IconButton`s, of which **24 have no `tooltip:` parameter**, all in the pattern `Tooltip(message: …, child: IconButton(…))` — which does not produce an accessible name. Verified with a throwaway test reusing the existing `unnamedButtons()` helper: `Tooltip(child: IconButton(...))` yields `[unnamed Rect.fromLTRB(0,0,48,48)]`; `IconButton(tooltip: …)` yields `[]`. Where they are: `app_shell_main_layout.dart` (7), `panels/preview_panel.dart` (4, zoom and collapse), `panels/editor_panel_controls.dart` (2), `presentation/parts/presenter_overlays.dart` (4, including the exit button and the grid close button), `presentation/parts/presenter_ink.dart` (3, the entire drawing toolbar), plus `slide_list_panel_bars.dart`, `duplicate_cleanup_dialog.dart`, `new_deck_dialog.dart`, `presentation_info_dialog.dart`. **Why this must be fixed before publication:** `README.md:42` and `docs/ACCESSIBILITY.md` sell "a test that fails the build when a button has no accessible name" as the proof that the accessibility claim is a claim and not a hope. That test covers six widgets; across the rest of the app the very fault it guards against stands 24 times, including the drawing layer and the button you use to leave a presentation. Someone opening the app with VoiceOver hears "button" on the exit control — and that is the first bug an accessibility reviewer reports publicly. **Proposal:** (1) convert the 24 from `Tooltip(child: IconButton(…))` to `IconButton(tooltip: …)` — mechanical, the text already exists and already goes through `d()`. (2) Add a source scan to `test/accessibility_labels_test.dart` forbidding `Tooltip(` wrapped directly around an `IconButton(`, which is far cheaper than pumping each of the 41 dialogs. (3) Until wider coverage exists, state in `docs/ACCESSIBILITY.md` how much the test covers, not merely that it exists.
Author
Owner

Opgelost in PR #687, op main. Alle drie je punten.

(1) De knoppen zijn omgezet naar IconButton(tooltip: …). De tekst bestond al en liep al door d(), dus er is geen woord bij verzonnen. Eén verschil met je telling: ik vind er 23, met een scan die de haakjes echt matcht. Waarschijnlijk zat er één Tooltip tussen die niet dírect om een IconButton stond.

(2) De bronscan staat in test/accessibility_labels_test.dart en loopt over heel lib/. Goedkoper dan 67 widgettests, en hij ziet juist de plekken die niemand ooit pompt. Eerst rood laten worden met een geplante overtreding — een scan die stilzwijgend niets doet is erger dan geen scan.

(3) docs/ACCESSIBILITY.md zei "walks the interface" en "found three real defects". Beide te royaal, en dat is precies de fout die dit issue aanwijst: hij pompt zes van de 26 editors, geen van de 41 dialogen, niets van de presentatiemodus — en achter die zes stonden er nog 23, waaronder de uitknop van een presentatie en de hele tekenbalk. Er staat nu in twee bullets wat hij wél doet, met de correctie gedateerd erbij.

Wat er níét in zit: bredere semantiekdekking voor de overige 20 editors en de 41 dialogen. Die vraagt om echt pompen en is een eigen stuk werk; deze scan dekt het ene patroon dat mechanisch te herkennen is.

Opgelost in PR #687, op main. Alle drie je punten. **(1)** De knoppen zijn omgezet naar `IconButton(tooltip: …)`. De tekst bestond al en liep al door `d()`, dus er is geen woord bij verzonnen. Eén verschil met je telling: ik vind er **23**, met een scan die de haakjes echt matcht. Waarschijnlijk zat er één `Tooltip` tussen die niet dírect om een `IconButton` stond. **(2)** De bronscan staat in `test/accessibility_labels_test.dart` en loopt over heel `lib/`. Goedkoper dan 67 widgettests, en hij ziet juist de plekken die niemand ooit pompt. Eerst rood laten worden met een geplante overtreding — een scan die stilzwijgend niets doet is erger dan geen scan. **(3)** `docs/ACCESSIBILITY.md` zei "walks the interface" en "found three real defects". Beide te royaal, en dat is precies de fout die dit issue aanwijst: hij pompt zes van de 26 editors, geen van de 41 dialogen, niets van de presentatiemodus — en achter die zes stonden er nog 23, waaronder de uitknop van een presentatie en de hele tekenbalk. Er staat nu in twee bullets wat hij wél doet, met de correctie gedateerd erbij. **Wat er níét in zit:** bredere semantiekdekking voor de overige 20 editors en de 41 dialogen. Die vraagt om echt pompen en is een eigen stuk werk; deze scan dekt het ene patroon dat mechanisch te herkennen is.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
LibreKAT/Ocideck#586
No description provided.