diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js
index b1d59d3c..3de63ff2 100644
--- a/frontend/eslint.config.js
+++ b/frontend/eslint.config.js
@@ -40,6 +40,26 @@ export default defineConfig(
parser: ts.parser,
svelteConfig
}
+ },
+ rules: {
+ // text-accent resolves to #a1dcd8 in light mode (1.52:1 on white — WCAG fail).
+ // layout.css documents it as decorative-only (borders, icon tints, bg fills).
+ // For any text label use text-primary or text-ink instead. This rule catches
+ // the pattern where text-accent appears inside a JavaScript string literal
+ // (e.g. conditional ternary class expressions in Svelte templates).
+ 'no-restricted-syntax': [
+ 'error',
+ {
+ selector: 'Literal[value=/\\btext-accent\\b/]',
+ message:
+ 'text-accent is decorative-only (#a1dcd8 in light mode = 1.52:1 contrast — WCAG fail). Use text-primary or text-ink-2 for text labels.'
+ },
+ {
+ selector: 'TemplateLiteral > TemplateElement[value.raw=/\\btext-accent\\b/]',
+ message:
+ 'text-accent is decorative-only (#a1dcd8 in light mode = 1.52:1 contrast — WCAG fail). Use text-primary or text-ink-2 for text labels.'
+ }
+ ]
}
}
);
diff --git a/frontend/src/lib/components/PdfControls.svelte b/frontend/src/lib/components/PdfControls.svelte
index 17c3ef96..da586f82 100644
--- a/frontend/src/lib/components/PdfControls.svelte
+++ b/frontend/src/lib/components/PdfControls.svelte
@@ -91,7 +91,7 @@ let {
aria-label={showAnnotations ? m.pdf_annotations_hide() : m.pdf_annotations_show()}
class="flex items-center gap-1.5 rounded px-2 py-1 font-sans text-xs transition {showAnnotations
? 'text-ink-2 hover:bg-surface/10'
- : 'bg-surface/10 text-accent'}"
+ : 'bg-surface/10 text-primary'}"
>
{percentage}%
diff --git a/frontend/src/lib/components/ProgressRing.svelte.spec.ts b/frontend/src/lib/components/ProgressRing.svelte.spec.ts
index 8efc36e5..c3e1ef46 100644
--- a/frontend/src/lib/components/ProgressRing.svelte.spec.ts
+++ b/frontend/src/lib/components/ProgressRing.svelte.spec.ts
@@ -25,12 +25,12 @@ describe('ProgressRing', () => {
expect(el.className).toContain('text-gray-400');
});
- it('renders a mint-colored label when percentage is > 0', async () => {
+ it('renders a primary-colored label when percentage is > 0', async () => {
render(ProgressRing, { percentage: 75 });
const label = page.getByText('75%');
await expect.element(label).toBeInTheDocument();
const el = (await label.element()) as HTMLElement;
- expect(el.className).toContain('text-accent');
+ expect(el.className).toContain('text-primary');
});
it('renders a fully filled arc for 100%', async () => {