Skip to content

Commit e97e945

Browse files
committed
feat: consolidate legacy agency routes and add design token baseline
1 parent d237f1e commit e97e945

7 files changed

Lines changed: 98 additions & 28 deletions

File tree

docs/ACCESSIBILITY_TRACKER.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,24 @@ Accessibility work is tracked in `/docs/plan/M07-ux-accessibility-and-design-sys
1212

1313
- Manual keyboard/screen reader checks for core flows.
1414
- Automated checks in CI where available.
15+
16+
## Verification Checklist (WCAG 2.1 AA)
17+
18+
- Public docket browse/search:
19+
- Keyboard-only navigation across filters, results, pagination.
20+
- Visible focus indicator on all interactive controls.
21+
- Search and filter inputs have programmatic labels.
22+
- Public comment submission:
23+
- Step flow is operable by keyboard only.
24+
- Error messages are announced and associated with fields.
25+
- Required field requirements are conveyed in text (not color-only).
26+
- Agency docket operations:
27+
- Docket list table headers expose valid `aria-sort` semantics.
28+
- Create/edit docket forms have explicit labels and error text.
29+
- Moderation and admin:
30+
- Role/actions are accessible without pointer-only interaction.
31+
- Confirmation/destructive actions are not color-only.
32+
- Global:
33+
- Contrast checks for text and interactive controls.
34+
- Heading structure is sequential.
35+
- Landmark regions (`header`, `main`, `footer`, nav) are present.

docs/plan/M07-ux-accessibility-and-design-system.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Consolidate UX architecture and enforce accessible, coherent UI patterns.
1414

1515
## Implementation checklist
1616

17-
- [ ] Consolidate overlapping route/page variants.
18-
- [ ] Define design token and component usage standard.
17+
- [x] Consolidate overlapping route/page variants.
18+
- [x] Define design token and component usage standard.
1919
- [ ] Remove critical "coming soon" production placeholders.
20-
- [ ] Add accessibility verification checklist.
20+
- [x] Add accessibility verification checklist.
2121

2222
## Acceptance criteria
2323

@@ -35,3 +35,6 @@ Consolidate UX architecture and enforce accessible, coherent UI patterns.
3535
## Progress log (append-only)
3636

3737
- 2026-02-11: Duplicate route inventory captured during baseline analysis.
38+
- 2026-02-11: Consolidated legacy route variants in `src/App.tsx` by redirecting deprecated agency paths (`/agency-login`, `/agency-dashboard`, `/agency/threads*`) to canonical routes.
39+
- 2026-02-11: Added baseline design tokens and surface styling in `src/index.css` and applied to shared layouts (`PublicLayout`, `AdminLayout`, root app shell).
40+
- 2026-02-11: Expanded `docs/ACCESSIBILITY_TRACKER.md` with a concrete WCAG 2.1 AA verification checklist for primary public and agency workflows.

docs/plan/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ This folder tracks implementation progress for the OpenComments production roadm
3838
- `M04`: In progress
3939
- `M05`: Completed
4040
- `M06`: Completed
41-
- `M07`: Planned
41+
- `M07`: In progress
4242
- `M08`: Completed
4343
- `M09`: Planned

src/App.tsx

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ import Privacy from './pages/Privacy';
1515
import Terms from './pages/Terms';
1616
import Accessibility from './pages/Accessibility';
1717
import PublicLogin from './pages/PublicLogin';
18-
import AgencyLogin from './pages/AgencyLogin';
1918
import PublicDashboard from './pages/PublicDashboard';
20-
import AgencyDashboard from './pages/AgencyDashboard';
2119
import AgencyLoginNew from './pages/agency/AgencyLogin';
2220
import AgencySelect from './pages/agency/AgencySelect';
2321
import AgencyNoAccess from './pages/agency/AgencyNoAccess';
@@ -56,7 +54,7 @@ function App() {
5654
<Router>
5755
<Routes>
5856
<Route path="/" element={
59-
<div className="min-h-screen bg-white font-sans">
57+
<div className="min-h-screen oc-surface">
6058
<SecurityBanner />
6159
<Header />
6260
<main>
@@ -93,18 +91,14 @@ function App() {
9391
<Route path="/comments/:id" element={<CommentDetail />} />
9492
<Route path="/search" element={<Navigate to="/comments/search" replace />} />
9593
<Route path="/login" element={<PublicLogin />} />
96-
<Route path="/agency-login" element={<AgencyLogin />} />
94+
<Route path="/agency-login" element={<Navigate to="/agency/login" replace />} />
9795
<Route path="/unauthorized" element={<Unauthorized />} />
9896
<Route path="/dashboard" element={
9997
<ProtectedRoute requiredRole="public">
10098
<PublicDashboard />
10199
</ProtectedRoute>
102100
} />
103-
<Route path="/agency-dashboard" element={
104-
<ProtectedRoute requiredRole="agency">
105-
<AgencyDashboard />
106-
</ProtectedRoute>
107-
} />
101+
<Route path="/agency-dashboard" element={<Navigate to="/agency/dashboard" replace />} />
108102

109103
{/* New Agency Admin Routes */}
110104
<Route path="/agency/login" element={<AgencyLoginNew />} />
@@ -116,16 +110,8 @@ function App() {
116110
<AgencyDashboardNew />
117111
</AgencyProtectedRoute>
118112
} />
119-
<Route path="/agency/threads" element={
120-
<AgencyProtectedRoute>
121-
<DocketList />
122-
</AgencyProtectedRoute>
123-
} />
124-
<Route path="/agency/threads/new" element={
125-
<AgencyProtectedRoute>
126-
<DocketWizard />
127-
</AgencyProtectedRoute>
128-
} />
113+
<Route path="/agency/threads" element={<Navigate to="/agency/dockets" replace />} />
114+
<Route path="/agency/threads/new" element={<Navigate to="/agency/dockets/new" replace />} />
129115
<Route path="/agency/dockets" element={
130116
<AgencyProtectedRoute>
131117
<DocketList />

src/components/AdminLayout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const AdminLayout: React.FC<AdminLayoutProps> = ({ children }) => {
173173
}
174174

175175
return (
176-
<div className="min-h-screen bg-gray-50">
176+
<div className="min-h-screen oc-admin-surface">
177177
{/* Mobile sidebar overlay */}
178178
{sidebarOpen && (
179179
<div
@@ -233,7 +233,7 @@ const AdminLayout: React.FC<AdminLayoutProps> = ({ children }) => {
233233
{/* Main content */}
234234
<div className="lg:pl-64">
235235
{/* Top bar */}
236-
<header className="bg-blue-700 shadow-sm">
236+
<header className="shadow-sm" style={{ backgroundColor: 'var(--oc-primary-strong)' }}>
237237
<div className="px-4 sm:px-6 lg:px-8">
238238
<div className="flex items-center justify-between h-16">
239239
{/* Mobile menu button */}
@@ -312,4 +312,4 @@ const AdminLayout: React.FC<AdminLayoutProps> = ({ children }) => {
312312
)
313313
}
314314

315-
export default AdminLayout
315+
export default AdminLayout

src/components/PublicLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const PublicLayout: React.FC<PublicLayoutProps> = ({
3030
}, [title, description])
3131

3232
return (
33-
<div className="min-h-screen bg-white font-sans">
33+
<div className="min-h-screen oc-surface">
3434
<SecurityBanner />
3535
<Header />
3636
<main className="min-h-screen">
@@ -42,4 +42,4 @@ const PublicLayout: React.FC<PublicLayoutProps> = ({
4242
}
4343

4444

45-
export default PublicLayout
45+
export default PublicLayout

src/index.css

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,63 @@
11
@tailwind base;
22
@tailwind components;
33
@tailwind utilities;
4+
5+
:root {
6+
--oc-bg: #f4f6f8;
7+
--oc-surface: #ffffff;
8+
--oc-surface-muted: #f8fafc;
9+
--oc-text: #102a43;
10+
--oc-text-muted: #486581;
11+
--oc-primary: #005ea2;
12+
--oc-primary-strong: #1a4480;
13+
--oc-border: #d9e2ec;
14+
--oc-focus: #2491ff;
15+
}
16+
17+
html,
18+
body,
19+
#root {
20+
min-height: 100%;
21+
}
22+
23+
body {
24+
margin: 0;
25+
font-family: "Public Sans", "Source Sans 3", sans-serif;
26+
color: var(--oc-text);
27+
background:
28+
radial-gradient(circle at 0% 0%, #e7f1ff 0%, rgba(231, 241, 255, 0) 40%),
29+
radial-gradient(circle at 100% 100%, #f0f9ff 0%, rgba(240, 249, 255, 0) 38%),
30+
var(--oc-bg);
31+
}
32+
33+
h1,
34+
h2,
35+
h3,
36+
h4,
37+
h5,
38+
h6 {
39+
font-family: "Merriweather", Georgia, serif;
40+
}
41+
42+
.oc-surface {
43+
background-color: var(--oc-bg);
44+
color: var(--oc-text);
45+
}
46+
47+
.oc-admin-surface {
48+
background-color: #eef2f7;
49+
}
50+
51+
.oc-panel {
52+
background: var(--oc-surface);
53+
border: 1px solid var(--oc-border);
54+
border-radius: 0.75rem;
55+
}
56+
57+
.oc-link-accent {
58+
color: var(--oc-primary);
59+
}
60+
61+
.oc-link-accent:hover {
62+
color: var(--oc-primary-strong);
63+
}

0 commit comments

Comments
 (0)