fix(queue): name the queue header's two older actions
Clear queue and Add queue to playlist were named by a `title` attribute and nothing else, while the close button beside them has carried an `aria-label` since #24. They get one too. `title` is a name, so this is the weak-name case rather than the missing one: it is the *last* fallback in the accname order, so any content put inside the button later silently outranks it, and a phone has no hover to show it. The `title`s stay — on a desktop they are also the tooltip for an icon-only control, which is a different job. The assertion is the part worth reading. The obvious spec — `getByRole` by name, which is what `queue-overlay.spec.ts` already does for the close button — is **green on the broken build**: measured against the running pre-fix app, both buttons matched. So the second test states the property as what it is, that the name is not the tooltip: it removes the `title` attributes and asks again, which was 0 and 0 on main and is 1 and 1 now. Closes #170
This commit is contained in:
@@ -1832,6 +1832,21 @@ is not it.** A `placeholder` is an accname fallback, so an
|
||||
Explore's search box — the audit's own `a11y.26` — as clean. A sweep
|
||||
for *empty* names cannot see a *weak* one.
|
||||
|
||||
**`title` is the same trap one rung lower, and it defeats the obvious
|
||||
spec as well as the obvious sweep.** `queue-panel`'s Clear queue and
|
||||
Add queue to playlist were named by `title` alone, so
|
||||
`getByRole('button', { name: 'Clear queue' })` matched them **before**
|
||||
the fix as well as after — a `getByRole` assertion, which is what
|
||||
catches every other nameless control in this app, would have been
|
||||
green on the broken build. `title` is the *last* fallback in the
|
||||
accname order, so content put inside the button later silently
|
||||
outranks it, and it is the one name a phone cannot show, having no
|
||||
hover. The property is therefore asserted as *the name is not the
|
||||
tooltip*: `queue-overlay.spec.ts` removes the `title` attributes and
|
||||
asks again, which is 1 and 1 with `aria-label` and was measured at 0
|
||||
and 0 without it. The `title`s stay, because on a desktop they are
|
||||
also the tooltip for an icon-only control and that is a different job.
|
||||
|
||||
**The shell scrolls sideways and not down.** `body` is
|
||||
`overflow-x: auto; overflow-y: hidden`, and both halves are measured.
|
||||
Vertically there is nothing to fix: the middle grid row is `1fr` and
|
||||
|
||||
Reference in New Issue
Block a user