diff --git a/docs/architecture.md b/docs/architecture.md index d4dfd71..a5ff7e7 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -17,7 +17,7 @@ type Node interface { } ``` -All concrete node types are unexported structs with exported constructor functions. The public API surface consists of nine node constructors, two accessibility helpers, plus the `Attr()` and `Render()` helpers: +All concrete node types are unexported structs with exported constructor functions. The public API surface consists of nine node constructors, four accessibility helpers, plus the `Attr()` and `Render()` helpers: | Constructor | Behaviour | |-------------|-----------| @@ -25,6 +25,8 @@ All concrete node types are unexported structs with exported constructor functio | `Attr(Node, key, value)` | Sets an attribute on an `El` node. Traverses through `If`, `Unless`, and `Entitled` wrappers. Returns the node for chaining. | | `AriaLabel(Node, label)` | Convenience helper that sets `aria-label` on an element node. | | `AltText(Node, text)` | Convenience helper that sets `alt` on an element node. | +| `TabIndex(Node, index)` | Convenience helper that sets `tabindex` on an element node. | +| `AutoFocus(Node)` | Convenience helper that sets `autofocus` on an element node. | | `Text(key, ...any)` | Translated text via the active context translator. Server builds fall back to global `go-i18n`; JS builds fall back to the key. Output is always HTML-escaped. | | `Raw(content)` | Unescaped trusted content. Explicit escape hatch. | | `If(cond, Node)` | Renders the child only when the condition function returns true. | diff --git a/docs/history.md b/docs/history.md index 8321ae2..d28b437 100644 --- a/docs/history.md +++ b/docs/history.md @@ -114,6 +114,6 @@ These are not regressions; they are design choices or deferred work recorded for These items were captured during the WASM size reduction work and expert review sessions. They are not committed work items. - **TypeScript type definitions** alongside `GenerateBundle()` for typed Web Component consumers. -- **Accessibility helpers** — `aria-label` builder, `alt` text helpers, focus management nodes. The layout has semantic HTML and ARIA roles but no API for fine-grained accessibility attributes beyond `Attr()`. +- **Accessibility helpers** — `aria-label` builder, `alt` text helpers, and focus management helpers (`TabIndex`, `AutoFocus`). The layout has semantic HTML and ARIA roles but no API for fine-grained accessibility attributes beyond `Attr()`. - **Layout variant validation** — return a warning or sentinel error from `NewLayout` when the variant string contains unrecognised slot characters. - **Daemon mode for codegen** — watch mode for regenerating the JS bundle when slot config changes, for development workflows. diff --git a/docs/index.md b/docs/index.md index 367e50a..6f1fd69 100644 --- a/docs/index.md +++ b/docs/index.md @@ -39,7 +39,7 @@ This builds a Header-Content-Footer layout with semantic HTML elements (`
` (H), `