Fix WCAG AA color contrast violations across all pages
Replace incorrect perceived-brightness formula in Stats progress bars with proper WCAG relative luminance calculation, and convert type bar colors to hex values for reliable contrast detection. Add light: variant classes to status badges, yellow/purple text, and admin nav links across 17 files. Darken light-mode status-active token and text-tertiary/muted tokens. Add aria-labels to admin filter selects and flex-wrap for mobile overflow on AdminEvolutions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -75,9 +75,9 @@ export function AdminEvolutions() {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex justify-between items-center mb-4">
|
||||
<div className="flex flex-wrap justify-between items-center gap-2 mb-4">
|
||||
<h2 className="text-xl font-semibold">Evolutions</h2>
|
||||
<div className="flex gap-2">
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<button
|
||||
onClick={async () => {
|
||||
const data = await exportEvolutions()
|
||||
@@ -102,7 +102,7 @@ export function AdminEvolutions() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mb-4 flex items-center gap-4">
|
||||
<div className="mb-4 flex flex-wrap items-center gap-4">
|
||||
<input
|
||||
type="text"
|
||||
value={search}
|
||||
@@ -114,6 +114,7 @@ export function AdminEvolutions() {
|
||||
className="w-full max-w-sm px-3 py-2 border rounded-md bg-surface-2 border-border-default"
|
||||
/>
|
||||
<select
|
||||
aria-label="Filter by trigger"
|
||||
value={triggerFilter}
|
||||
onChange={(e) => {
|
||||
setTriggerFilter(e.target.value)
|
||||
|
||||
@@ -70,8 +70,9 @@ export function AdminGames() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mb-4 flex items-center gap-4">
|
||||
<div className="mb-4 flex flex-wrap items-center gap-4">
|
||||
<select
|
||||
aria-label="Filter by region"
|
||||
value={regionFilter}
|
||||
onChange={(e) => setRegionFilter(e.target.value)}
|
||||
className="px-3 py-2 border rounded-md bg-surface-2 border-border-default"
|
||||
@@ -84,6 +85,7 @@ export function AdminGames() {
|
||||
))}
|
||||
</select>
|
||||
<select
|
||||
aria-label="Filter by generation"
|
||||
value={genFilter}
|
||||
onChange={(e) => setGenFilter(e.target.value)}
|
||||
className="px-3 py-2 border rounded-md bg-surface-2 border-border-default"
|
||||
|
||||
@@ -116,6 +116,7 @@ export function AdminPokemon() {
|
||||
className="w-full max-w-sm px-3 py-2 border rounded-md bg-surface-2 border-border-default"
|
||||
/>
|
||||
<select
|
||||
aria-label="Filter by type"
|
||||
value={typeFilter}
|
||||
onChange={(e) => {
|
||||
setTypeFilter(e.target.value)
|
||||
|
||||
Reference in New Issue
Block a user