feat(housekeeping): finish accessible command deck
This commit is contained in:
1 parent
85ad0452d3
commit
a113e48880
55 files changed
+17064
-509
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { satisfiesCapability } from "@/features/housekeeping/foundation/capability-context";
|
||||
import { createHousekeepingRegistry } from "@/features/housekeeping/foundation/registry";
|
||||
import { matchHousekeepingRoute } from "@/features/housekeeping/foundation/routing/match-route";
|
||||
@@ -40,11 +41,13 @@ export default async function HousekeepingPreviewRoutePage({
|
||||
) {
|
||||
notFound();
|
||||
}
|
||||
const translate = await getTranslations("pages.housekeeping");
|
||||
|
||||
return handler.render({
|
||||
context,
|
||||
match,
|
||||
surface: "preview",
|
||||
translate: (key) => translate(key as never),
|
||||
...(searchParams ? { searchParams: await searchParams } : {}),
|
||||
});
|
||||
}
|
||||
@@ -54,6 +54,9 @@ export default async function HousekeepingPreviewDomainLayout({
|
||||
command: translate("preview.commandDisabled"),
|
||||
preview: translate("preview.badge"),
|
||||
backToSite: translate("preview.backToSite"),
|
||||
operatorRank: translate("navigation.operatorRank", {
|
||||
rank: context.actor.rank,
|
||||
}),
|
||||
commandDeck: {
|
||||
placeholder: translate("commandDeck.placeholder"),
|
||||
navigation: translate("commandDeck.navigation"),
|
||||
|
||||
@@ -73,6 +73,7 @@ export default async function HousekeepingPreviewRootPage() {
|
||||
context,
|
||||
match,
|
||||
surface: "preview",
|
||||
translate: (key) => translate(key as never),
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -87,6 +88,9 @@ export default async function HousekeepingPreviewRootPage() {
|
||||
command: translate("preview.commandDisabled"),
|
||||
preview: translate("preview.badge"),
|
||||
backToSite: translate("preview.backToSite"),
|
||||
operatorRank: translate("navigation.operatorRank", {
|
||||
rank: context.actor.rank,
|
||||
}),
|
||||
commandDeck: {
|
||||
placeholder: translate("commandDeck.placeholder"),
|
||||
navigation: translate("commandDeck.navigation"),
|
||||
|
||||
@@ -1618,6 +1618,42 @@ details[open] > summary .details-open\:rotate-180 {
|
||||
}
|
||||
}
|
||||
|
||||
/* Housekeeping command deck: keyboard focus, narrow screens, and motion safety. */
|
||||
[data-housekeeping-root] :is(a, button, input, select, textarea):focus-visible {
|
||||
outline: 2px solid var(--admin-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
#housekeeping-content {
|
||||
max-width: 100%;
|
||||
overflow-x: clip;
|
||||
}
|
||||
|
||||
#housekeeping-content table {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
overscroll-behavior-inline: contain;
|
||||
}
|
||||
|
||||
#housekeeping-content :is(pre, code, img, svg, canvas) {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
[data-housekeeping-root],
|
||||
[data-housekeeping-root] * {
|
||||
/* biome-ignore lint/complexity/noImportantStyles: accessibility preference must override component styles */
|
||||
scroll-behavior: auto !important;
|
||||
/* biome-ignore lint/complexity/noImportantStyles: accessibility preference must override component styles */
|
||||
animation-duration: 0.01ms !important;
|
||||
/* biome-ignore lint/complexity/noImportantStyles: accessibility preference must override component styles */
|
||||
animation-iteration-count: 1 !important;
|
||||
/* biome-ignore lint/complexity/noImportantStyles: accessibility preference must override component styles */
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Premium effects ── */
|
||||
@keyframes float {
|
||||
0%,
|
||||
|
||||
Reference in new issue
Block a user