Make the provider reorder control honest #255

Closed
opened 2026-08-25 18:15:15 +01:00 by naps62-yolo · 0 comments
Owner

Two problems in the same control, both pre-existing from #204 and both found
while implementing #251, which deliberately left them alone.

1. An invisible control that still takes focus. web/src/style.css has:

.provider-move:disabled { visibility: hidden }

At each end of the provider list the reorder button is hidden this way. But
visibility: hidden removes it from the accessibility tree only in some
engines and, more to the point, the button is still in the DOM and — depending
on how the disabled state is applied — can still be announced or tabbed to. A
keyboard or screen-reader user meets a control that appears to be nothing.

disabled already blocks the click, so the hiding is decoration, not
mechanism. Either leave it visibly disabled (the shared .control:disabled
colour already says so honestly), or drop opacity while keeping it in place so
the row does not reflow as the operator reorders.

2. Reorder buttons are found by position. refreshProviderEdges in
web/src/settings.ts locates them with button:nth-of-type(1) and
nth-of-type(2). The day a third button joins a provider row — a delete, a
test-connection — the edge enable/disable logic silently targets the wrong
control. Nothing errors; it just stops being right.

Give them a data- attribute or a class and select on that.

Neither is urgent. Both are the kind of thing that is cheap now and confusing
later.

Found while implementing #251.

Depends on: #204

Two problems in the same control, both pre-existing from #204 and both found while implementing #251, which deliberately left them alone. **1. An invisible control that still takes focus.** `web/src/style.css` has: ```css .provider-move:disabled { visibility: hidden } ``` At each end of the provider list the reorder button is hidden this way. But `visibility: hidden` removes it from the accessibility tree only in some engines and, more to the point, the button is still in the DOM and — depending on how the disabled state is applied — can still be announced or tabbed to. A keyboard or screen-reader user meets a control that appears to be nothing. `disabled` already blocks the click, so the hiding is decoration, not mechanism. Either leave it visibly disabled (the shared `.control:disabled` colour already says so honestly), or drop opacity while keeping it in place so the row does not reflow as the operator reorders. **2. Reorder buttons are found by position.** `refreshProviderEdges` in `web/src/settings.ts` locates them with `button:nth-of-type(1)` and `nth-of-type(2)`. The day a third button joins a provider row — a delete, a test-connection — the edge enable/disable logic silently targets the wrong control. Nothing errors; it just stops being right. Give them a `data-` attribute or a class and select on that. Neither is urgent. Both are the kind of thing that is cheap now and confusing later. Found while implementing #251. Depends on: #204
naps62-yolo added this to the Subtitles milestone 2026-08-25 18:15:15 +01:00
naps62-yolo added the difficulty/easyphase/9-subtitlesarea/webtype/bug labels 2026-08-25 18:15:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#255