Accessibility pass, report control for homework exercises, clearer rail actions
- axe is clean across every screen in both themes, phone and desktop. Fixed: the hidden file inputs (aria-hidden + tabIndex -1 — they are opened by labelled buttons, so they should not be in the accessibility tree), the heading order (deck/homework/smart-review cards are h2 under the page h1; LearningSection takes a level so it stays h2 on the library and h3 inside the settings dialog) and landmarks around the study and review feeds. - tests/contrast.mjs (new diagnostic): samples rendered pixels, because axe cannot judge text on blurred glass — it reports those nodes as incomplete. It skips disabled controls (1.4.3 exempts them) and content behind an open sheet. Result: no below-minimum text on any scanned screen. - The report control exists in the homework guide too: under each "Try it yourself" exercise, labelled "Report exercise", without a skip (there is no queue to skip). lib/question-reports now takes deckId/deckTitle directly. - The rail's two creation actions are buttons now (.nav-action) rather than quiet nav rows — once the library is full they were the only way to start something on desktop and read as just more navigation. "Make my homework" is "New homework" wherever it is an action (rail, empty state, share chooser, manifest shortcut); the page title and mode switch keep their wording. Version 0.1.6 (three task bumps), SW -> freezmo-v52.
This commit is contained in:
parent
8822baf4b7
commit
df34337b4a
27 changed files with 337 additions and 75 deletions
|
|
@ -137,23 +137,24 @@ function NavContent({ collapsed = false }: { collapsed?: boolean }) {
|
|||
{!collapsed ? <span className="flex-1 truncate text-left">{t("sidebar.collapse")}</span> : null}
|
||||
</button>
|
||||
|
||||
{/* new deck: a quiet row, not a competing primary button ---------- */}
|
||||
{/* new deck: a button, not a nav row — it stays visible when the
|
||||
library is already full (see .nav-action in globals.css) --------- */}
|
||||
<Link
|
||||
href="/create"
|
||||
className={cn("nav-row mb-3", collapsed && "justify-center px-2")}
|
||||
className={cn("nav-action mb-2.5", collapsed && "justify-center px-2")}
|
||||
title={t("common.newDeck")}
|
||||
>
|
||||
<PlusIcon className="size-4 shrink-0" />
|
||||
<PlusIcon className="size-4 shrink-0 text-accent-600 dark:text-accent-200" />
|
||||
{!collapsed ? <span className="flex-1 truncate text-left">{t("common.newDeck")}</span> : null}
|
||||
</Link>
|
||||
|
||||
{/* make my homework: same quiet row --------------------------------- */}
|
||||
{/* new homework: the same button ------------------------------------ */}
|
||||
<Link
|
||||
href="/homework"
|
||||
className={cn("nav-row mb-3", collapsed && "justify-center px-2")}
|
||||
className={cn("nav-action mb-3", collapsed && "justify-center px-2")}
|
||||
title={t("homework.nav")}
|
||||
>
|
||||
<SparklesIcon className="size-4 shrink-0" />
|
||||
<SparklesIcon className="size-4 shrink-0 text-accent-600 dark:text-accent-200" />
|
||||
{!collapsed ? <span className="flex-1 truncate text-left">{t("homework.nav")}</span> : null}
|
||||
</Link>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue