fix(document): enlarge auto-title helper to 14px and assert its localized text (#726)
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 2m35s
CI / OCR Service Tests (pull_request) Successful in 22s
CI / Backend Unit Tests (pull_request) Successful in 3m33s
CI / fail2ban Regex (pull_request) Successful in 48s
CI / Semgrep Security Scan (pull_request) Successful in 22s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m6s
CI / Unit & Component Tests (push) Failing after 2m31s
CI / OCR Service Tests (push) Successful in 21s
CI / Backend Unit Tests (push) Successful in 3m38s
CI / fail2ban Regex (push) Successful in 44s
CI / Semgrep Security Scan (push) Successful in 22s
CI / Compose Bucket Idempotency (push) Successful in 1m6s
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 2m35s
CI / OCR Service Tests (pull_request) Successful in 22s
CI / Backend Unit Tests (pull_request) Successful in 3m33s
CI / fail2ban Regex (pull_request) Successful in 48s
CI / Semgrep Security Scan (pull_request) Successful in 22s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m6s
CI / Unit & Component Tests (push) Failing after 2m31s
CI / OCR Service Tests (push) Successful in 21s
CI / Backend Unit Tests (push) Successful in 3m38s
CI / fail2ban Regex (push) Successful in 44s
CI / Semgrep Security Scan (push) Successful in 22s
CI / Compose Bucket Idempotency (push) Successful in 1m6s
Bumps the title helper from text-xs (12px) to text-sm (14px) for the 60+ audience (FR-005 prefers a larger size than the field hints) and tightens the component test to assert the actual localized string and the 14px class — addresses Leonie's and Sara's review notes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit was merged in pull request #727.
This commit is contained in:
@@ -78,7 +78,7 @@ const titleValue = $derived(titleDirty ? currentTitle : suggestedTitle || curren
|
||||
class="block w-full rounded border border-line p-2 text-sm shadow-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring"
|
||||
/>
|
||||
{#if showTitleHelp}
|
||||
<p id="title-help" class="mt-1 text-xs text-ink-3">
|
||||
<p id="title-help" class="mt-1 text-sm text-ink-3">
|
||||
{m.form_helper_title_autogenerated()}
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { afterEach, describe, expect, it } from 'vitest';
|
||||
import { cleanup, render } from 'vitest-browser-svelte';
|
||||
import DescriptionSection from './DescriptionSection.svelte';
|
||||
import { m } from '$lib/paraglide/messages.js';
|
||||
|
||||
afterEach(() => cleanup());
|
||||
|
||||
@@ -57,11 +58,13 @@ describe('DescriptionSection — onMount seeding (Felix B1/B2 fix regression fen
|
||||
});
|
||||
|
||||
describe('DescriptionSection — auto-generated title helper (FR-TITLE-005)', () => {
|
||||
it('shows the helper and wires aria-describedby when showTitleHelp is set', async () => {
|
||||
it('shows the helper with the localized text and wires aria-describedby when showTitleHelp is set', async () => {
|
||||
render(DescriptionSection, { showTitleHelp: true });
|
||||
const help = document.querySelector('#title-help') as HTMLElement;
|
||||
expect(help).not.toBeNull();
|
||||
expect(help.textContent?.trim().length ?? 0).toBeGreaterThan(0);
|
||||
expect(help.textContent?.trim()).toBe(m.form_helper_title_autogenerated());
|
||||
// ≥14px for the 60+ audience (FR-005 prefers a larger size than the 12px field hints).
|
||||
expect(help.classList.contains('text-sm')).toBe(true);
|
||||
const titleInput = document.querySelector('input#title') as HTMLInputElement;
|
||||
expect(titleInput.getAttribute('aria-describedby')).toBe('title-help');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user