diff --git a/ui/dr-ui/ui/toolrail.slint b/ui/dr-ui/ui/toolrail.slint index da913f8..1753208 100644 --- a/ui/dr-ui/ui/toolrail.slint +++ b/ui/dr-ui/ui/toolrail.slint @@ -121,6 +121,26 @@ export component ToolRail inherits Rectangle { root.picked(entry.on ? ViewMode.photo : tool.mode); } + // **The word below is drawn; this is what makes it a control.** + // Without these the rail reaches a screen reader as four pieces of + // static text — the labels get through, because a `Text` announces + // itself, and nothing says any of them can be pressed. That is the + // develop view's primary navigation reduced to a caption. + // + // `checkable` unconditionally, unlike `Button`'s: a rail entry is + // always a held-or-not state, so an unheld one should say "not + // pressed" rather than pass for an ordinary button. The action + // repeats the click handler rather than calling it, because a + // `TouchArea`'s `clicked` is raised by the pointer and cannot be + // raised from here. + accessible-role: button; + accessible-label: tool.label; + accessible-checkable: true; + accessible-checked: entry.on; + accessible-action-default => { + root.picked(entry.on ? ViewMode.photo : tool.mode); + } + // The lit tile, and the only marker there is. Inset from the // rail's edges so the run of four reads as four things rather than // as one striped column.