mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-15 05:36:17 -08:00
fix(portals): make facet chips keyboard-operable and reject zero years
- The chips were plain spans with a click handler, so the whole feature was mouse-only. Actionable chips are <button> now (focusable, Enter and Space activate); a year chip that cannot be discovered by stays an informational span rather than becoming a disabled button. The button chrome is neutralized so they render identically to the chips beside them, with a visible focus ring. - `0000-00-00`, the placeholder providers ship for "no date", read as a four-digit year: the chip offered it, and the request then dropped the filter because 0 is falsy, so the page answered with unfiltered popular titles. `isTmdbYearFacet()` now gates both the chip and the route params, so a deep link cannot reach a state the chips refuse to offer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
065437b378
commit
8a7a7ba8b0
11 files changed
+164
-60
No files matched your search
@@ -320,8 +320,15 @@
|
||||
border-color: rgba(255, 215, 0, 0.3);
|
||||
}
|
||||
|
||||
// Rendered as a <button> so the facet is keyboard-operable; the
|
||||
// UA's own font and appearance have to be neutralized to keep it
|
||||
// visually identical to the informational chips beside it.
|
||||
&--clickable {
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
letter-spacing: inherit;
|
||||
line-height: inherit;
|
||||
transition:
|
||||
border-color 0.15s ease,
|
||||
background 0.15s ease;
|
||||
@@ -330,6 +337,11 @@
|
||||
background: var(--tag-border);
|
||||
border-color: var(--text-secondary, rgba(255, 255, 255, 0.5));
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--text-primary, #fff);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,8 +83,15 @@
|
||||
border-color: rgba(255, 215, 0, 0.3);
|
||||
}
|
||||
|
||||
// Rendered as a <button> so the facet is keyboard-operable; the UA's
|
||||
// own font and appearance have to be neutralized to keep it visually
|
||||
// identical to the informational chips beside it.
|
||||
&--clickable {
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
letter-spacing: inherit;
|
||||
line-height: inherit;
|
||||
transition:
|
||||
border-color 0.15s ease,
|
||||
background 0.15s ease;
|
||||
@@ -93,6 +100,11 @@
|
||||
background: var(--tag-border, rgba(255, 255, 255, 0.2));
|
||||
border-color: var(--text-secondary, rgba(255, 255, 255, 0.5));
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--text-primary, #fff);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user