fix(ui): a focused, disabled FocusSafeButton no longer lights up on hover

A FocusSafeButton that holds the focus is disabled by aria-disabled, not the native attribute, so
every hover gated on `:disabled` / `enabled:` alone still fired on it — the glass lift, the primary /
danger / warn dim, and eight `enabled:hover:` chains (saved views, the player's list buttons, the
undo toolbar). Measured on localdev: the Pager's Next, focused at the last page, now keeps its resting
border and shadow under the pointer. The CSS selectors and the chains also exclude
`[aria-disabled="true"]`, and a lint rule refuses a bare `enabled:hover:` from now on.
This commit is contained in:
2026-09-19 18:14:18 +02:00
parent 046ff735cf
commit 30fbdc52b2
6 changed files with 46 additions and 9 deletions
+12
View File
@@ -221,6 +221,18 @@ export default tseslint.config(
// The canonical "FE control" row (CLAUDE.md): a short fixed set is a SegmentedToggle, a
// longer one or a user's own list a FilterSelect. Six native selects had drifted in; the
// 2026-09 debt burn replaced them, and this keeps the next one out.
// `enabled:` sees only the native attribute; a FocusSafeButton that holds the focus is
// disabled by aria-disabled, so a bare `enabled:hover:` lit it up on hover as if it worked.
{
selector: "Literal[value=/(^|\\s)enabled:hover:/]",
message:
"`enabled:hover:` misses a focused FocusSafeButton (aria-disabled): use `enabled:not-aria-disabled:hover:`.",
},
{
selector: "TemplateElement[value.raw=/(^|\\s)enabled:hover:/]",
message:
"`enabled:hover:` misses a focused FocusSafeButton (aria-disabled): use `enabled:not-aria-disabled:hover:`.",
},
{
selector: "JSXOpeningElement[name.name='select']",
message: