fix(app): the « Client introuvable » screen focuses its heading too
Every client screen focuses its heading when it opens (contract §11.7); the not-found screen did not. Unit and Chromium tests now assert the focus. Found by the V1-1.5 verifier.
This commit is contained in:
1 parent
e1c1980949
commit
567ad40c80
3 files changed
+6
-6
No files matched your search
@@ -1,18 +1,18 @@
|
||||
import ButtonLink from '@/components/ui/ButtonLink'
|
||||
import Card from '@/components/ui/Card'
|
||||
import { usePageHeading } from '@/app/usePageHeading'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
/** The same screen for an unknown id and an id of another workspace (contract §11.1). */
|
||||
export default function ClientNotFound() {
|
||||
const t = useT()
|
||||
const heading = usePageHeading()
|
||||
return (
|
||||
<Card as="section" className="space-y-3 p-5 sm:p-6">
|
||||
<h1 className="font-serif text-2xl text-[var(--color-ink)]">
|
||||
<h1 ref={heading} tabIndex={-1} className="outline-none font-serif text-2xl text-[var(--color-ink)]">
|
||||
{t('clients.not_found.title')}
|
||||
</h1>
|
||||
<p className="text-sm text-[var(--color-ink-muted)]">
|
||||
{t('clients.not_found.body')}
|
||||
</p>
|
||||
<p className="text-sm text-[var(--color-ink-muted)]">{t('clients.not_found.body')}</p>
|
||||
<ButtonLink to="/app/clients" variant="secondary">
|
||||
{t('clients.not_found.back')}
|
||||
</ButtonLink>
|
||||
|
||||
Reference in new issue
Block a user