diff --git a/AGENTS.md b/AGENTS.md index 9313984..ca7be96 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,6 +20,11 @@ commands and layout. no `NODE_ENV` (or equivalent) branching. Every behaviour is an **explicit config toggle** (e.g. `CACHE_TEMPLATES`, `REQUIRE_SECURE_SECRETS`, a future "disable email"), read once in `src/config.ts`. Compose files set the toggles per deployment. +5. **Semantic, accessible DOM** — markup is a first-class concern. Use the right element + for the job (landmarks, one `

` per page + sane heading order, lists, `` with + row/column headers, `
`/``, `
<% } else if (cell.user) { -%> - + <% } else if (cell.badge) { -%> <% } else if (cell.html != null) { -%> diff --git a/views/partials/shell.ejs b/views/partials/shell.ejs index 4e45242..07139ea 100644 --- a/views/partials/shell.ejs +++ b/views/partials/shell.ejs @@ -21,6 +21,7 @@ + <%- include("icons") %> @@ -67,10 +68,10 @@ -
+
-
<%= title %>
+

<%= title %>

<% if (breadcrumbs.length) { %>
Actions<\/span><\/th>/); - // Typed cells: user (avatar + strong), classed text, badge tone, raw html. - assert.match(html, /; classed text, badge tone, raw html. + assert.match(html, /mara@x.io<\/td>/); assert.match(html, /Engineering<\/td>/); assert.match(html, /<\/span>Active<\/span><\/td>/); diff --git a/src/shell.test.ts b/src/shell.test.ts index 54d143d..32933f1 100644 --- a/src/shell.test.ts +++ b/src/shell.test.ts @@ -16,10 +16,14 @@ test("app shell renders sidebar, topbar and the content slot", async () => { actions: '', }); - // Three structural landmarks of the shell. + // Skip link is the first focusable element, targeting the main landmark. + assert.match(html, /

` (CSS styles tbody `th`), error pages got descriptive headings (code retained). Tests-first: shell/data-table specs assert the new markup; typecheck + 75 units + 6 E2E green. - [ ] Run the architecture _and_ the stability reviewer agents on the _whole_ project, not just the latest changes, and address their issues. - [ ] Go over all comments in the code and the README and try to make it shorter and more information dense. Remove not strictly needed stuff. - [ ] Go over all tests and combine/unify ones that cover the same stuff or are very related and could be combined in a good way. Remove tests that aren't helping, we only want tests that are actually helpful to us. diff --git a/views/403.ejs b/views/403.ejs index 60770bf..ac5e734 100644 --- a/views/403.ejs +++ b/views/403.ejs @@ -8,8 +8,8 @@
-

403

-

You don't have access to that.

+

Access denied

+

You don't have permission to view that (403).

Back home

diff --git a/views/404.ejs b/views/404.ejs index 5d1987a..f1b5da0 100644 --- a/views/404.ejs +++ b/views/404.ejs @@ -8,8 +8,8 @@
-

404

-

That page does not exist.

+

Page not found

+

We couldn't find that page (404).

Back home

diff --git a/views/500.ejs b/views/500.ejs index 774d8d5..6afc50e 100644 --- a/views/500.ejs +++ b/views/500.ejs @@ -8,8 +8,8 @@
-

500

-

Something went wrong on our end.

+

Something went wrong

+

An unexpected error occurred on our end (500).

Back home

diff --git a/views/partials/data-table.ejs b/views/partials/data-table.ejs index b06913d..518a30a 100644 --- a/views/partials/data-table.ejs +++ b/views/partials/data-table.ejs @@ -6,6 +6,7 @@ columns: { label, sortable?, sort?: "asc"|"desc", href?, className? }[] rows: { name?, cells: Cell[], actions?: Action[] }[] Cell ∈ string | { text, className? } | { user:{name,initials} } | { badge:{tone,label} } | { html, className? } + user cells render as
— they identify the row (the row header). Action = { label, icon?, href?, danger?, separatorBefore? } %><% const caption = locals.caption; @@ -46,7 +47,7 @@ <% if (typeof cell === "string") { -%> <%= cell %><%= cell.user.name %><%= cell.user.name %><%= cell.badge.label %>