@neetechs/ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/LICENSE +21 -21
- package/README.md +862 -861
- package/dist/ai/ai-action-button/ai-action-button.css +271 -271
- package/dist/ai/ai-approval-card/ai-approval-card.css +323 -323
- package/dist/ai/ai-conversation-panel/ai-conversation-panel.css +447 -447
- package/dist/ai/ai-prompt-input/ai-prompt-input.css +380 -380
- package/dist/ai/ai-proposal-card/ai-proposal-card.css +358 -358
- package/dist/ai/ai-suggestion-card/ai-suggestion-card.css +295 -295
- package/dist/ai/ai-tool-call/ai-tool-call.css +256 -256
- package/dist/ai/index.css +7 -7
- package/dist/behaviors/index.d.ts +1 -0
- package/dist/behaviors/index.d.ts.map +1 -1
- package/dist/behaviors/index.js +1 -0
- package/dist/behaviors/index.js.map +1 -1
- package/dist/behaviors/selection-indicator.d.ts +35 -0
- package/dist/behaviors/selection-indicator.d.ts.map +1 -0
- package/dist/behaviors/selection-indicator.js +133 -0
- package/dist/behaviors/selection-indicator.js.map +1 -0
- package/dist/behaviors/sidebar.d.ts +3 -1
- package/dist/behaviors/sidebar.d.ts.map +1 -1
- package/dist/behaviors/sidebar.js +10 -3
- package/dist/behaviors/sidebar.js.map +1 -1
- package/dist/components/alert/alert.css +226 -226
- package/dist/components/avatar/avatar.css +298 -298
- package/dist/components/badge/badge.css +180 -180
- package/dist/components/breadcrumb/breadcrumb.css +207 -207
- package/dist/components/button/button.css +278 -278
- package/dist/components/card/card.css +336 -284
- package/dist/components/checkbox/checkbox.css +189 -189
- package/dist/components/chip/chip.css +269 -269
- package/dist/components/data-grid/data-grid.css +520 -520
- package/dist/components/description-list/description-list.css +187 -187
- package/dist/components/dialog/dialog.css +348 -339
- package/dist/components/dock/dock.css +319 -0
- package/dist/components/drawer/drawer.css +493 -484
- package/dist/components/dropdown/dropdown.css +325 -316
- package/dist/components/fab/fab.css +281 -0
- package/dist/components/icon-button/icon-button.css +162 -162
- package/dist/components/index.css +2 -0
- package/dist/components/input/input.css +163 -163
- package/dist/components/menu/menu.css +315 -315
- package/dist/components/pagination/pagination.css +250 -250
- package/dist/components/panel/panel.css +316 -284
- package/dist/components/popover/popover.css +22 -0
- package/dist/components/progress/progress.css +268 -268
- package/dist/components/radio/radio.css +166 -166
- package/dist/components/segmented-control/segmented-control.css +264 -205
- package/dist/components/select/select.css +117 -117
- package/dist/components/skeleton/skeleton.css +267 -267
- package/dist/components/split-button/split-button.css +292 -292
- package/dist/components/stat/stat.css +433 -433
- package/dist/components/switch/switch.css +195 -195
- package/dist/components/table/table.css +220 -220
- package/dist/components/tabs/tabs.css +393 -293
- package/dist/components/textarea/textarea.css +86 -86
- package/dist/components/toast/toast.css +345 -345
- package/dist/components/tooltip/tooltip.css +267 -258
- package/dist/domain/billing/index.css +629 -629
- package/dist/domain/calendar/agenda-list/agenda-list.css +224 -224
- package/dist/domain/calendar/day-slice/day-slice.css +384 -384
- package/dist/domain/calendar/day-timeline/day-timeline.css +332 -332
- package/dist/domain/calendar/event-card/event-card.css +338 -338
- package/dist/domain/calendar/index.css +5 -5
- package/dist/domain/calendar/month-grid/month-grid.css +426 -426
- package/dist/domain/calendar/week-grid/week-grid.css +487 -480
- package/dist/domain/companies/index.css +526 -526
- package/dist/domain/index.css +3 -3
- package/dist/index.css +5 -5
- package/dist/patterns/command-palette/command-palette.css +488 -447
- package/dist/patterns/company-switcher/company-switcher.css +390 -390
- package/dist/patterns/content-state/content-state.css +236 -236
- package/dist/patterns/empty-state/empty-state.css +260 -260
- package/dist/patterns/error-state/error-state.css +272 -272
- package/dist/patterns/form-layout/form-layout.css +106 -106
- package/dist/patterns/loading-state/loading-state.css +287 -287
- package/dist/patterns/master-detail/master-detail.css +103 -103
- package/dist/patterns/notification-center/notification-center.css +443 -443
- package/dist/patterns/page/page.css +303 -303
- package/dist/patterns/profile-menu/profile-menu.css +298 -298
- package/dist/patterns/record-list/record-list.css +302 -302
- package/dist/patterns/search-bar/search-bar.css +457 -457
- package/dist/patterns/settings-layout/settings-layout.css +283 -283
- package/dist/patterns/workflow/workflow.css +168 -168
- package/dist/shell/app-shell/app-shell.css +429 -211
- package/dist/shell/content-frame/content-frame.css +93 -93
- package/dist/shell/header/header.css +328 -328
- package/dist/shell/index.css +8 -8
- package/dist/shell/mobile-nav/mobile-nav.css +254 -254
- package/dist/shell/sidebar/sidebar.css +923 -314
- package/dist/styles/accessibility.css +150 -150
- package/dist/styles/animations/motion.css +162 -162
- package/dist/styles/appearance/accent.css +215 -215
- package/dist/styles/appearance/density.css +61 -61
- package/dist/styles/appearance/motion.css +48 -40
- package/dist/styles/base.css +83 -83
- package/dist/styles/index.css +29 -28
- package/dist/styles/localization.css +56 -56
- package/dist/styles/reset.css +51 -51
- package/dist/styles/responsive.css +101 -101
- package/dist/styles/themes/dark.css +225 -210
- package/dist/styles/themes/high-contrast.css +378 -298
- package/dist/styles/themes/light.css +224 -209
- package/dist/styles/tokens/breakpoints.css +37 -37
- package/dist/styles/tokens/color.css +102 -102
- package/dist/styles/tokens/compatibility.css +33 -33
- package/dist/styles/tokens/elevation.css +33 -26
- package/dist/styles/tokens/index.css +9 -9
- package/dist/styles/tokens/motion.css +55 -36
- package/dist/styles/tokens/radius.css +26 -26
- package/dist/styles/tokens/spacing.css +56 -56
- package/dist/styles/tokens/typography.css +85 -85
- package/dist/styles/tokens/z-index.css +14 -14
- package/dist/styles/utilities/glass.css +97 -0
- package/dist/styles/utilities/layout.css +153 -153
- package/dist/styles/utilities/text.css +152 -152
- package/dist/styles/utilities/visibility.css +47 -47
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/NEETECHS_UI_UPGRADE_PLAN.md +312 -312
- package/docs/accessibility.md +218 -218
- package/docs/appearance-and-theming.md +150 -150
- package/docs/brand-palette.md +36 -36
- package/docs/component-architecture.md +137 -137
- package/docs/component-guidelines.md +64 -64
- package/docs/components.md +326 -321
- package/docs/content-and-terminology.md +207 -207
- package/docs/design-system-baseline-audit.md +226 -226
- package/docs/design-token-contract.md +279 -279
- package/docs/glass-and-motion.md +310 -0
- package/docs/localization-and-rtl.md +147 -147
- package/docs/migration.md +193 -193
- package/docs/page-patterns-and-workflows.md +301 -301
- package/docs/responsive-and-adaptive-design.md +351 -351
- package/docs/semantic-role-migration-audit.md +77 -77
- package/docs/site-chrome.md +320 -317
- package/docs/states-feedback-and-recovery.md +206 -206
- package/docs/theming.md +5 -5
- package/package.json +2 -1
- package/src/ai/ai-action-button/ai-action-button.css +271 -271
- package/src/ai/ai-approval-card/ai-approval-card.css +323 -323
- package/src/ai/ai-conversation-panel/ai-conversation-panel.css +447 -447
- package/src/ai/ai-prompt-input/ai-prompt-input.css +380 -380
- package/src/ai/ai-proposal-card/ai-proposal-card.css +358 -358
- package/src/ai/ai-suggestion-card/ai-suggestion-card.css +295 -295
- package/src/ai/ai-tool-call/ai-tool-call.css +256 -256
- package/src/ai/index.css +7 -7
- package/src/appearance/cache.ts +236 -236
- package/src/appearance/cookie.ts +184 -184
- package/src/appearance/index.ts +86 -86
- package/src/appearance/preference.ts +121 -121
- package/src/appearance/theme-controller.ts +384 -384
- package/src/appearance/types.ts +61 -61
- package/src/behaviors/announcer.ts +222 -222
- package/src/behaviors/calendar.ts +92 -92
- package/src/behaviors/data-grid.ts +133 -133
- package/src/behaviors/dialog.ts +203 -203
- package/src/behaviors/direction.ts +34 -34
- package/src/behaviors/drawer.ts +210 -210
- package/src/behaviors/dropdown.ts +344 -344
- package/src/behaviors/focus-trap.ts +304 -304
- package/src/behaviors/forms.ts +205 -205
- package/src/behaviors/ids.ts +47 -47
- package/src/behaviors/index.ts +1 -0
- package/src/behaviors/keyboard.ts +305 -305
- package/src/behaviors/overlay.ts +344 -344
- package/src/behaviors/selection-indicator.ts +162 -0
- package/src/behaviors/sidebar.ts +14 -4
- package/src/behaviors/state.ts +282 -282
- package/src/behaviors/tabs.ts +137 -137
- package/src/behaviors/viewport.ts +61 -61
- package/src/components/alert/alert.css +226 -226
- package/src/components/avatar/avatar.css +298 -298
- package/src/components/badge/badge.css +180 -180
- package/src/components/breadcrumb/breadcrumb.css +207 -207
- package/src/components/button/button.css +278 -278
- package/src/components/card/card.css +336 -284
- package/src/components/checkbox/checkbox.css +189 -189
- package/src/components/chip/chip.css +269 -269
- package/src/components/data-grid/data-grid.css +520 -520
- package/src/components/description-list/description-list.css +187 -187
- package/src/components/dialog/dialog.css +348 -339
- package/src/components/dock/dock.css +319 -0
- package/src/components/drawer/drawer.css +493 -484
- package/src/components/dropdown/dropdown.css +325 -316
- package/src/components/fab/fab.css +281 -0
- package/src/components/icon-button/icon-button.css +162 -162
- package/src/components/index.css +2 -0
- package/src/components/input/input.css +163 -163
- package/src/components/menu/menu.css +315 -315
- package/src/components/pagination/pagination.css +250 -250
- package/src/components/panel/panel.css +316 -284
- package/src/components/popover/popover.css +22 -0
- package/src/components/progress/progress.css +268 -268
- package/src/components/radio/radio.css +166 -166
- package/src/components/segmented-control/segmented-control.css +264 -205
- package/src/components/select/select.css +117 -117
- package/src/components/skeleton/skeleton.css +267 -267
- package/src/components/split-button/split-button.css +292 -292
- package/src/components/stat/stat.css +433 -433
- package/src/components/switch/switch.css +195 -195
- package/src/components/table/table.css +220 -220
- package/src/components/tabs/tabs.css +393 -293
- package/src/components/textarea/textarea.css +86 -86
- package/src/components/toast/toast.css +345 -345
- package/src/components/tooltip/tooltip.css +267 -258
- package/src/domain/billing/index.css +629 -629
- package/src/domain/calendar/agenda-list/agenda-list.css +224 -224
- package/src/domain/calendar/day-slice/day-slice.css +384 -384
- package/src/domain/calendar/day-timeline/day-timeline.css +332 -332
- package/src/domain/calendar/event-card/event-card.css +338 -338
- package/src/domain/calendar/index.css +5 -5
- package/src/domain/calendar/month-grid/month-grid.css +426 -426
- package/src/domain/calendar/week-grid/week-grid.css +487 -480
- package/src/domain/companies/index.css +526 -526
- package/src/domain/index.css +3 -3
- package/src/index.css +5 -5
- package/src/index.ts +7 -7
- package/src/localization/index.ts +56 -56
- package/src/patterns/command-palette/command-palette.css +488 -447
- package/src/patterns/company-switcher/company-switcher.css +390 -390
- package/src/patterns/content-state/content-state.css +236 -236
- package/src/patterns/empty-state/empty-state.css +260 -260
- package/src/patterns/error-state/error-state.css +272 -272
- package/src/patterns/form-layout/form-layout.css +106 -106
- package/src/patterns/loading-state/loading-state.css +287 -287
- package/src/patterns/master-detail/master-detail.css +103 -103
- package/src/patterns/notification-center/notification-center.css +443 -443
- package/src/patterns/page/page.css +303 -303
- package/src/patterns/profile-menu/profile-menu.css +298 -298
- package/src/patterns/record-list/record-list.css +302 -302
- package/src/patterns/search-bar/search-bar.css +457 -457
- package/src/patterns/settings-layout/settings-layout.css +283 -283
- package/src/patterns/workflow/workflow.css +168 -168
- package/src/shell/app-shell/app-shell.css +429 -211
- package/src/shell/content-frame/content-frame.css +93 -93
- package/src/shell/header/header.css +328 -328
- package/src/shell/index.css +8 -8
- package/src/shell/mobile-nav/mobile-nav.css +254 -254
- package/src/shell/sidebar/sidebar.css +923 -314
- package/src/styles/accessibility.css +150 -150
- package/src/styles/animations/motion.css +162 -162
- package/src/styles/appearance/accent.css +215 -215
- package/src/styles/appearance/density.css +61 -61
- package/src/styles/appearance/motion.css +48 -40
- package/src/styles/base.css +83 -83
- package/src/styles/index.css +29 -28
- package/src/styles/localization.css +56 -56
- package/src/styles/reset.css +51 -51
- package/src/styles/responsive.css +101 -101
- package/src/styles/themes/dark.css +225 -210
- package/src/styles/themes/high-contrast.css +378 -298
- package/src/styles/themes/light.css +224 -209
- package/src/styles/tokens/breakpoints.css +37 -37
- package/src/styles/tokens/color.css +102 -102
- package/src/styles/tokens/compatibility.css +33 -33
- package/src/styles/tokens/elevation.css +33 -26
- package/src/styles/tokens/index.css +9 -9
- package/src/styles/tokens/motion.css +55 -36
- package/src/styles/tokens/radius.css +26 -26
- package/src/styles/tokens/spacing.css +56 -56
- package/src/styles/tokens/typography.css +85 -85
- package/src/styles/tokens/z-index.css +14 -14
- package/src/styles/utilities/glass.css +97 -0
- package/src/styles/utilities/layout.css +153 -153
- package/src/styles/utilities/text.css +152 -152
- package/src/styles/utilities/visibility.css +47 -47
- package/src/types/index.ts +126 -126
- package/src/version.ts +1 -1
package/docs/accessibility.md
CHANGED
|
@@ -1,218 +1,218 @@
|
|
|
1
|
-
# Accessibility contract
|
|
2
|
-
|
|
3
|
-
Localization does not weaken this contract. Set correct `lang`/`dir`, provide complete accessible names in the active language, isolate technical values without changing their spoken label, and test visual keyboard order in RTL. Native Arabic screen-reader QA remains an application responsibility; see [localization-and-rtl.md](./localization-and-rtl.md).
|
|
4
|
-
|
|
5
|
-
`@neetechs/ui` targets WCAG 2.2 Level AA as its engineering baseline. This is not a certification: applications must still test their content, routing, framework integration, localization, screen-reader experience, and complete user journeys.
|
|
6
|
-
|
|
7
|
-
The package is CSS-first. CSS classes provide appearance; they cannot repair incorrect HTML. The behavior exports under `@neetechs/ui/behaviors` add only relationships and interactions that require JavaScript. Consumers remain responsible for meaningful labels and product-specific descriptions.
|
|
8
|
-
|
|
9
|
-
## 1. Baseline requirements
|
|
10
|
-
|
|
11
|
-
- Normal text is at least 4.5:1; large text and meaningful non-text boundaries are at least 3:1.
|
|
12
|
-
- Keyboard focus uses `:focus-visible`, a 2px semantic ring, and a 2px offset. Never remove an outline without a replacement in the same rule.
|
|
13
|
-
- Primary and icon-only controls expose a 44×44px target. Dense contextual controls expose at least 40×40px. Inline text links, browser-native controls, tightly packed data points, and controls whose spacing provides an equivalent compound target are documented exceptions.
|
|
14
|
-
- Native HTML is preferred. Do not replace a `button`, `a`, `input`, `select`, `textarea`, `table`, `fieldset`, or heading with a generic element plus ARIA.
|
|
15
|
-
- Light/dark × orange/blue/green/purple/neutral semantic contrast is enforced by `npm run check:a11y`.
|
|
16
|
-
- High contrast and forced colors layer over light or dark. Reduced motion removes decorative travel/lift and preserves state feedback.
|
|
17
|
-
|
|
18
|
-
## 2. Native HTML and accessible names
|
|
19
|
-
|
|
20
|
-
Use visible text as the accessible name whenever possible. Icon-only controls require a concise `aria-label` or associated visible label. `title` is supplementary, not the only naming strategy. Images use meaningful `alt`, empty `alt` when decorative, or a nearby text alternative for complex graphics. Decorative SVGs are `aria-hidden="true"`; meaningful SVGs inherit `currentColor` and are named by surrounding content.
|
|
21
|
-
|
|
22
|
-
Labels describe the control, while `aria-describedby` connects helper, constraint, consequence, and error copy. Placeholder text is never the only label. Do not repeat visible text in `aria-label`; that can override better content.
|
|
23
|
-
|
|
24
|
-
## 3. Component accessibility inventory
|
|
25
|
-
|
|
26
|
-
Prompt 7 consolidation note: modal CSS and `ntCreateModal` now delegate to the canonical dialog implementation; the right-drawer path/classes delegate to canonical logical drawer CSS; company/workspace switchers share one visual source and the menu-popover behavior. These compatibility names do not define separate accessibility contracts. The table export is now a styled native-table contract and remains intentionally separate from the interactive data grid. See [component-architecture.md](./component-architecture.md).
|
|
27
|
-
|
|
28
|
-
Prompt 8 state note: operation state now uses native semantics plus `data-nt-state` where needed; content-region state uses `data-nt-content-state`; legacy `--loading`, `--error`, and `--success` modifiers are styling compatibility hooks. See [states-feedback-and-recovery.md](./states-feedback-and-recovery.md).
|
|
29
|
-
|
|
30
|
-
The inventory covers all 59 shipped UI/domain CSS modules. “Gallery” means the representative Playwright/axe contract gallery; “manual” identifies an application-level check still required.
|
|
31
|
-
|
|
32
|
-
| Component and source | Semantic/name contract | Keyboard and focus | State/feedback contract | Target, modes, coverage and residual risk |
|
|
33
|
-
|---|---|---|---|---|
|
|
34
|
-
| Alert — `src/components/alert/alert.css` | Static notice: section/region; urgent dynamic error: `role=alert`; routine update: `role=status`; heading names region | Actions are native controls; no container tab stop | Severity is text/icon plus color; recovery action is named | Actions 40/44; forced-color border; gallery. Urgency choice remains manual |
|
|
35
|
-
| Avatar — `src/components/avatar/avatar.css` | Decorative avatar has empty alt/hidden initials; informative image has person/org name | Not focusable unless a native link/button wrapper | Presence/status needs text alternative | CurrentColor boundary; manual image-alt review |
|
|
36
|
-
| Badge — `src/components/badge/badge.css` | Text span; status role only for a dynamic update | Not focusable unless interactive variant is a button | Status wording must not rely on hue | Forced-color boundary; semantic contrast; manual copy review |
|
|
37
|
-
| Breadcrumb — `src/components/breadcrumb/breadcrumb.css` | `nav aria-label="Breadcrumb"`, ordered list, current item `aria-current=page` | Native links; visible focus | Current page is not a dead unlabeled link | Inline-link target exception; structure manual |
|
|
38
|
-
| Button — `src/components/button/button.css` | Native `button`; visible text is name; busy keeps original name and uses `aria-busy` | Native Enter/Space; no redundant handlers | Native `disabled`; `aria-disabled` requires activation guard; loading prevents repeat | Primary 44; focus/contrast/motion/forced colors tested |
|
|
39
|
-
| Card — `src/components/card/card.css` | Article/section only with a heading; clickable card uses one real link/button, not nested controls | Only actual actions focus | Selected cards use `aria-selected` only in a selection widget | Reduced lift; selected outline in forced colors; structure manual |
|
|
40
|
-
| Checkbox — `src/components/checkbox/checkbox.css` | Native checkbox inside label; groups use fieldset/legend | Native Space | `checked`, `indeterminate`, `disabled`, required/error on input | 40px row; system-color forced mode; gallery/axe |
|
|
41
|
-
| Chip — `src/components/chip/chip.css` | Static tag is text; removable/choice chip uses native button and named remove action | Native activation; composite owner manages arrows | `aria-pressed`/`aria-selected`; disabled guard | 40px interactive target; composite behavior app-owned |
|
|
42
|
-
| Data grid — `src/components/data-grid/data-grid.css`, `src/behaviors/data-grid.ts` | Prefer semantic table. Opt-in `role=grid` only for 2-D interaction; headers name columns; help describes keys | Roving arrows, Home/End, Ctrl+Home/End, activation callback | `aria-sort`, `aria-selected`, disabled; polite sort live region | Visible focus/selection; browser tested. Editing/resize policy app-specific |
|
|
43
|
-
| Dialog — `src/components/dialog/dialog.css`, `src/behaviors/dialog.ts` | Dialog role/modal state/title and optional description references | Intentional initial focus, Tab trap, Escape if dismissible, restore invoker | Background inert, scroll locked, hidden closed, nested-stack aware | Boundary/focus forced colors; nested browser test; SR manual |
|
|
44
|
-
| Drawer — `src/components/drawer/drawer.css`, `src/behaviors/drawer.ts` | Explicit modal dialog or nonmodal region/navigation | Modal traps/restores; nonmodal follows page order; top overlay owns Escape | Modal background inert; role/modal match declared modality | Reduced travel/forced boundary; nested browser test |
|
|
45
|
-
| Dropdown — `src/components/dropdown/dropdown.css`, `src/behaviors/dropdown.ts` | Trigger button with popup/expanded/controls; content is menu or listbox, not both | Arrow open/navigation, Home/End, typeahead, activation, Escape returns trigger; no Tab trap | Disabled items skipped/blocked; closed content hidden | Items 40px; browser tested. Listbox value sync consumer-owned |
|
|
46
|
-
| Icon button — `src/components/icon-button/icon-button.css` | Native button with required accessible name | Native activation; visible focus | Disabled/loading as button | 44px default, 40px compact; browser measured |
|
|
47
|
-
| Input — `src/components/input/input.css`, `src/behaviors/forms.ts` | Visible label; stable help/error IDs | Native editing and focus | required, invalid, disabled, readonly, busy distinct | 40px minimum; contrast/focus/axe |
|
|
48
|
-
| Menu — `src/components/menu/menu.css`, dropdown behavior | Menu only for application commands; navigation remains nav/links | Up/Down, Home/End, typeahead, activation, Escape; no Tab trap | Disabled items skipped/blocked; checked command roles where needed | 40px; browser tested through dropdown |
|
|
49
|
-
| Modal compatibility - `@neetechs/ui/components/modal.css`, `ntCreateModal` | Deprecated aliases to canonical dialog CSS/behavior; identical naming requirement | Same canonical trap/restore contract | Adapter forces `modal: true`; no second focus manager | Architecture-tested; migrate to dialog before 1.0 |
|
|
50
|
-
| Pagination — `src/components/pagination/pagination.css` | Labelled nav; native links/buttons; current page `aria-current=page` | Native activation/sequence | Disabled previous/next native or non-link text | 40×40; forced selected outline; structure manual |
|
|
51
|
-
| Panel — `src/components/panel/panel.css` | Section/aside only when landmark/heading is useful | Actions only | Loading may set `aria-busy` on panel | Semantic boundary; structure manual |
|
|
52
|
-
| Progress — `src/components/progress/progress.css` | Native progress or named progressbar with value/min/max; indeterminate has status text | Not focusable | Announce milestones, not every frame | Motion reduced without losing state; cadence manual |
|
|
53
|
-
| Radio — `src/components/radio/radio.css` | Native radios in fieldset/legend | Native arrows/Space | checked/disabled/required/error on input | 40px row; forced colors; gallery/axe |
|
|
54
|
-
| Segmented control — `src/components/segmented-control/segmented-control.css` | Radio group for exclusive value or toolbar of buttons for commands; label group | Native radios or documented roving behavior | checked/pressed/disabled explicit | Focus/selected distinct; role choice manual |
|
|
55
|
-
| Select — `src/components/select/select.css` | Native label + select unless complete combobox implemented | Native browser behavior | disabled/required/invalid; native select has no readonly | 40px; contrast/focus/axe |
|
|
56
|
-
| Skeleton — `src/components/skeleton/skeleton.css` | Decorative skeleton hidden; containing region busy with readable status | Not focusable | Real content replaces skeleton; no repeated announcements | Animation suppressed; gallery loading pattern |
|
|
57
|
-
| Split button — `src/components/split-button/split-button.css` | Two named native buttons: action and disclosure | Native action; disclosure follows menu contract | Disabled/loading coherent across both | 40/44 by action; composition manual |
|
|
58
|
-
| Switch — `src/components/switch/switch.css` | Prefer native checkbox; custom switch requires checked state and label | Native Space | checked/disabled; no mixed state | 40px row; forced colors; gallery/axe |
|
|
59
|
-
| Table — `src/components/table/table.css` | Native table/caption/scope headers; no grid role for display-only data | Standard AT table navigation | Sort buttons inside headers and announce state | Overflow response deferred; markup manual |
|
|
60
|
-
| Tabs — `src/components/tabs/tabs.css`, `src/behaviors/tabs.ts` | tablist/tab/tabpanel with generated controls/labelledby IDs | Orientation arrows, Home/End, one tab stop; automatic/manual declared | selected/disabled/hidden panel synchronized | 40px; focus/forced selection; browser tested |
|
|
61
|
-
| Textarea — `src/components/textarea/textarea.css` | Visible label and descriptions | Native editing | readonly readable/focusable; disabled/invalid distinct | 40px; contrast/focus/axe |
|
|
62
|
-
| Toast — `src/components/toast/toast.css`, `src/behaviors/announcer.ts` | Routine status; urgent error alert; named close | No automatic focus; close keyboard accessible; timed toast pauses hover/focus | Critical content persists; status wording explicit | Gallery semantics; `ntCreateToastController` covers timers, dedupe, stack limit, pause, and cleanup |
|
|
63
|
-
| Tooltip — `src/components/tooltip/tooltip.css` | Tooltip role/stable describedby; never sole essential content | Opens focus/hover; Escape dismissal when behavior exists; no interactive children | Hidden tooltip not exposed | Reduced motion/forced text; lifecycle consumer-owned |
|
|
64
|
-
| AI action button — `src/ai/ai-action-button/ai-action-button.css` | Named native button; name states action, not only “AI” | Native activation | Busy preserves name, blocks repeat, exposes status | 44px; independent AI contrast; reduced motion |
|
|
65
|
-
| AI approval card — `src/ai/ai-approval-card/ai-approval-card.css` | Heading names card; description states intent, target, consequence, reversibility | Native reject/approve; safe action first | Pending/status polite; confirmation/success/failure explicit | Gallery/axe/actions; product copy/workflow manual |
|
|
66
|
-
| AI conversation panel — `src/ai/ai-conversation-panel/ai-conversation-panel.css` | Named region/log; messages identify speaker; streaming status separate | Normal document/controls order | New content polite/batched; do not reread transcript | Streaming behavior app-owned |
|
|
67
|
-
| AI prompt input — `src/ai/ai-prompt-input/ai-prompt-input.css` | Labelled textarea/input; named send/attachment | Native editing; multiline Enter preserved unless policy declared | Busy/error/counter associated without chatter | Controls 40/44; policy manual |
|
|
68
|
-
| AI proposal card — `src/ai/ai-proposal-card/ai-proposal-card.css` | Heading + proposal description; buttons name consequences | Native actions | Approval not inferred from purple; explicit status | Focus/contrast; workflow manual |
|
|
69
|
-
| AI suggestion card — `src/ai/ai-suggestion-card/ai-suggestion-card.css` | List/article with descriptive suggestion action | Native action; owning widget handles arrows if selection composite | Accepted/rejected text plus status | Focus/selection/contrast; list behavior manual |
|
|
70
|
-
| AI tool call — `src/ai/ai-tool-call/ai-tool-call.css` | Human-readable operation/target/status; raw JSON optional detail | Disclosure button for collapsed detail | Running/success/failure at meaningful transitions | Status contrast; descriptions manual |
|
|
71
|
-
| Billing — `src/domain/billing/index.css` | Semantic tables/lists/forms; amounts include currency/sign in text | Native actions/table navigation | Financial sign never color-only; errors use form contract | Financial tokens; localization audit deferred |
|
|
72
|
-
| Companies — `src/domain/companies/index.css` | Named company list/region; logos follow avatar rules; actions are native | Native list actions; switcher menu uses shared behavior | Active company, role, permission, and availability use text/ARIA plus visual state | Focus/target/forced colors; product permissions and names manual |
|
|
73
|
-
| Calendar day slice — `src/domain/calendar/day-slice/day-slice.css` | Named time-grid; events named with title/time | Application declares arrows or normal Tab, not both | Current/selected time text/ARIA, not color only | Focus/forced/reduced; core grid browser tested |
|
|
74
|
-
| Calendar timeline — `src/domain/calendar/day-timeline/day-timeline.css` | Time labels/events expose start/end | Event keyboard path documented by app | Current time/category needs non-color text | Drag/resize keyboard alternative app-specific |
|
|
75
|
-
| Calendar event card — `src/domain/calendar/event-card/event-card.css` | Native link/button with event name/time/category | Native activation; menu uses shared behavior | selected/current/cancelled text/ARIA plus visual | 44 primary; compact context exception; copy manual |
|
|
76
|
-
| Calendar month grid — `src/domain/calendar/month-grid/month-grid.css`, calendar behavior | Grid rows/cells; full date spoken label; today current date | ±1/±7 arrows, Home/End, one tab stop | selection state; range polite live region | 44px behavior hook; browser tested |
|
|
77
|
-
| Calendar week grid — `src/domain/calendar/week-grid/week-grid.css`, calendar behavior | Named grid/time-grid and full event names | Declared grid or event Tab model | current/selected not color-only | Focus/forced; complex navigation manual |
|
|
78
|
-
| Command palette — `src/patterns/command-palette/command-palette.css` | Modal dialog with labelled combobox/listbox | Input arrows/Home/End/Enter/Escape; modal trap/restore | Loading/empty readable; active descendant when input retains focus | Complete combobox controller is a known limitation |
|
|
79
|
-
| Company switcher — `src/patterns/company-switcher/company-switcher.css` | Disclosure + menu/listbox chosen by command vs value | Shared dropdown keyboard | Selected company/unavailable explicit | 40px/shared browser behavior; content manual |
|
|
80
|
-
| Content state — `src/patterns/content-state/content-state.css` | Heading/description/native recovery; urgency chosen by context | Native action; no automatic focus unless recovering from failed submission | `data-nt-content-state` differentiates loading, empty, error, offline, permission, not-found, maintenance, success | Target/focus/contrast/RTL; manual content |
|
|
81
|
-
| Empty state — `src/patterns/empty-state/empty-state.css` | Legacy pattern over content-state guidance; heading/description/native recovery; no alert | Native action | Static absence is not urgent | Compatible; prefer `.nt-content-state` for new work |
|
|
82
|
-
| Error state — `src/patterns/error-state/error-state.css` | Legacy pattern over content-state guidance; heading/recovery/action; alert only dynamically urgent | Native action | Reason/recovery not icon/color only | Compatible; prefer `.nt-content-state` for new work |
|
|
83
|
-
| Loading state — `src/patterns/loading-state/loading-state.css` | Legacy pattern over content-state guidance; named status; affected region busy; skeleton hidden | Do not move/strand focus | Announce start/end or milestones only | Compatible; prefer `.nt-content-state` for new work |
|
|
84
|
-
| Notification center — `src/patterns/notification-center/notification-center.css` | Named region/list; item heading/time/read state | Native actions; optional menu shared | Unread text/ARIA plus color; updates polite | Focus/forced color; update behavior manual |
|
|
85
|
-
| Profile menu — `src/patterns/profile-menu/profile-menu.css` | Trigger + command menu | Shared dropdown menu | Disabled/current account explicit | Shared browser menu; names manual |
|
|
86
|
-
| Search bar — `src/patterns/search-bar/search-bar.css` | Search landmark/form, labelled input, named clear/submit | Native editing/submission; Escape clear only if declared | Loading/results count polite; clear updates value | Focus/targets; results combobox not provided |
|
|
87
|
-
| Workspace switcher - `@neetechs/ui/patterns/workspace-switcher.css` | Disclosure + menu/listbox chosen by purpose; shared entity-switcher CSS | Shared menu-popover behavior | Selected workspace explicit | Shared browser behavior; rich content semantics remain consumer-owned |
|
|
88
|
-
| App shell — `src/shell/app-shell/app-shell.css` | Header/nav/main/aside landmarks, one main, app supplies skip link | Logical DOM order; no positive tabindex | Busy main does not indefinitely inert nav | Global focus/motion; landmarks manual |
|
|
89
|
-
| Content frame — `src/shell/content-frame/content-frame.css` | Main/section with heading hierarchy | Normal order | Loading/error use pattern contracts | Noninteractive; heading audit manual |
|
|
90
|
-
| Header — `src/shell/header/header.css` | Header landmark; labelled nav | Native controls and skip target | Expanded menus reflect state | Focus/target/forced; composition manual |
|
|
91
|
-
| Mobile nav — `src/shell/mobile-nav/mobile-nav.css` | Labelled nav; current link; overlay version uses drawer contract | Native links; modal traps/restores | open/closed and isolation explicit | 40px/reduced motion; responsive redesign deferred |
|
|
92
|
-
| Right-drawer compatibility - `@neetechs/ui/shell/right-drawer.css` | Deprecated classes/path map to canonical logical drawer; declare modal/nonmodal role | Shared drawer contract | Same modality/state rules | Migrate to inline-end drawer; nested overlay test covers canonical behavior |
|
|
93
|
-
| Sidebar — `src/shell/sidebar/sidebar.css` | Labelled nav/aside; current link | Native links/disclosures | Collapsed items remain named | 40px/focus/forced; responsive deferred |
|
|
94
|
-
|
|
95
|
-
## 4. Keyboard interaction table
|
|
96
|
-
|
|
97
|
-
| Pattern | Required keys |
|
|
98
|
-
|---|---|
|
|
99
|
-
| Button | Enter and Space through native behavior |
|
|
100
|
-
| Link | Enter through native behavior |
|
|
101
|
-
| Menu | Up/Down, Home/End, typeahead, Enter/Space, Escape; Tab exits rather than traps |
|
|
102
|
-
| Tabs | Left/Right or Up/Down by orientation, Home/End; activation mode declared |
|
|
103
|
-
| Modal dialog | Tab and Shift+Tab stay inside; Escape closes only when dismissal is allowed and only the top overlay |
|
|
104
|
-
| Grid | Arrows; Home/End row bounds; Ctrl+Home/End grid bounds; consumer activation |
|
|
105
|
-
| Calendar | Left/Right one day, Up/Down one week, Home/End week bounds |
|
|
106
|
-
| Native form controls | Browser-native behavior; no duplicate activation handlers |
|
|
107
|
-
|
|
108
|
-
## 5. Focus management and overlays
|
|
109
|
-
|
|
110
|
-
`ntCreateDialog` and modal `ntCreateDrawer` set role/name/description relationships, unhide before focus, isolate background branches with `inert`, lock scroll with reference counting, trap focus, and restore the connected invoker after inert state is removed. Overlay and focus stacks ensure Escape and Tab affect only the top nested overlay. `destroy()` removes listeners and locks.
|
|
111
|
-
|
|
112
|
-
Initial focus should be the least destructive useful control, a heading/container for long content, or the first invalid field. Destructive confirmation is not the default. Nonmodal drawers use `modal: false` and `role: 'region'` or `'navigation'`; they do not trap or inert. Portaled overlays must keep the active modal/backdrop outside inert branches.
|
|
113
|
-
|
|
114
|
-
## 6. Forms, validation, and error summaries
|
|
115
|
-
|
|
116
|
-
```html
|
|
117
|
-
<label id="email-label" for="email">Email <span aria-hidden="true">*</span></label>
|
|
118
|
-
<input id="email" required aria-describedby="email-help email-error" aria-invalid="true">
|
|
119
|
-
<p id="email-help">Use your work address.</p>
|
|
120
|
-
<p id="email-error">Enter a valid email address.</p>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
`ntConnectField()` establishes stable IDs and relationships but cannot invent labels or recovery copy. Native `required`, `disabled`, and `readonly` remain authoritative where supported. Read-only fields remain readable/selectable and may stay focusable; disabled controls do not activate and ordinarily leave the Tab sequence.
|
|
124
|
-
|
|
125
|
-
An error summary is a named region with heading and links to invalid fields. Reveal it, then call `ntFocusErrorSummary()`. Avoid combining focus movement with assertive announcement unless interruption is required. Password reveal controls name the action and state; clear buttons name the field; counters announce thresholds, not every keystroke.
|
|
126
|
-
|
|
127
|
-
## 7. Feedback, loading, and live regions
|
|
128
|
-
|
|
129
|
-
- Routine success/update: `role=status`, `aria-live=polite`.
|
|
130
|
-
- Immediate actionable failure: `role=alert`; not for static empty states.
|
|
131
|
-
- Long operation: `aria-busy=true` on the affected region plus concise status text; batch progress.
|
|
132
|
-
- Toasts never take focus automatically. Timed toasts pause while hovered/focused; critical content persists elsewhere.
|
|
133
|
-
- Skeleton geometry is hidden from AT; a readable sibling communicates loading.
|
|
134
|
-
|
|
135
|
-
Use `ntCreateAnnouncer()` for application messages and destroy it at teardown. `ntConfigureToastSemantics()` selects polite or assertive semantics intentionally. Use `ntCreateToastController()` when the package-owned DOM controls toast timers, dedupe, stack limits, pause-on-hover/focus, and cleanup.
|
|
136
|
-
|
|
137
|
-
## 8. Disabled, read-only, selected, and loading
|
|
138
|
-
|
|
139
|
-
Disabled means unavailable/noninteractive; prefer native disabled. `aria-disabled=true` does not block events, so behavior must guard activation. Read-only means readable but not editable and must not look identical to disabled. Selected uses the owning pattern's selected/checked/pressed/current state and a boundary that survives forced colors. Focus remains distinct. Loading/pending is not disabled: it preserves the name, exposes busy, prevents repeat activation, and keeps focus stable. `ntCreateAsyncAction()` implements that contract for action controls.
|
|
140
|
-
|
|
141
|
-
## 9. Contrast and focus tokens
|
|
142
|
-
|
|
143
|
-
Components consume `--nt-focus-ring-width`, `--nt-focus-ring-offset`, `--nt-focus-ring-color`, `--nt-focus-ring-danger`, and `--nt-focus-ring-inverse`. Target roles are `--nt-target-size-primary`, `--nt-target-size-default`, and `--nt-target-size-compact`.
|
|
144
|
-
|
|
145
|
-
`scripts/check-accessibility.mjs` resolves 14 semantic pairs across light/dark and five accents (140 measurements). It enforces 4.5:1 text, 3:1 focus/control boundaries, rejects unsafe outline removal, and requires forced-colors/reduced-motion layers. It tests semantic contracts instead of brittle full CSS snapshots.
|
|
146
|
-
|
|
147
|
-
## 10. High contrast and forced colors
|
|
148
|
-
|
|
149
|
-
Manual high contrast strengthens boundaries and disables shadow-only elevation. In forced colors, controls retain system boundaries, links use `LinkText`, selection/current state gains a `Highlight` outline, and icons inherit `currentColor`. `forced-color-adjust: none` is not used. Custom checkbox/radio/switch visuals preserve the native input and system state.
|
|
150
|
-
|
|
151
|
-
## 11. Reduced motion
|
|
152
|
-
|
|
153
|
-
The central layer and component rules remove decorative lift, scale, spinner, long drawer/dialog travel, and smooth scrolling under system or manual reduced motion. Short color/state changes may remain. Loading retains text/busy feedback when animation stops.
|
|
154
|
-
|
|
155
|
-
## 12. Data-grid guidance
|
|
156
|
-
|
|
157
|
-
Use a semantic table for read-only data. Use `ntCreateDataGrid()` only for spreadsheet-like 2-D navigation. It supplies roving focus, bounds navigation, selection callbacks, and sort announcements; applications define editing, selection model, virtualization, resize increments, and undo. Resize handles are named focusable controls with arrow increments and final announcements.
|
|
158
|
-
|
|
159
|
-
## 13. Calendar guidance
|
|
160
|
-
|
|
161
|
-
`ntCreateCalendarGrid()` supplies one-tab-stop date navigation and range announcements. Dates/events need full spoken labels including date and time. Today is `aria-current=date`; selection is `aria-selected`; they are visually distinct. Category/availability/conflict needs non-color alternatives. Drag/drop and resize need host keyboard alternatives.
|
|
162
|
-
|
|
163
|
-
## 14. AI approval guidance
|
|
164
|
-
|
|
165
|
-
Approval states what Neenee will do, which record/system changes, reversibility, confirmation requirement, and pending/success/failure result. Actions name consequences, such as “Approve and create event”. Safe/reject/review precedes destructive approval absent a documented reason. Purple identifies AI origin; status semantics describe consequences.
|
|
166
|
-
|
|
167
|
-
## 15. Correct and incorrect patterns
|
|
168
|
-
|
|
169
|
-
Correct:
|
|
170
|
-
|
|
171
|
-
```html
|
|
172
|
-
<button class="nt-icon-button" aria-label="Close invoice details">…</button>
|
|
173
|
-
<button aria-expanded="false" aria-controls="account-menu">Account menu</button>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Incorrect:
|
|
177
|
-
|
|
178
|
-
```html
|
|
179
|
-
<div class="nt-button" onclick="save()">Save</div>
|
|
180
|
-
<button class="nt-icon-button" title="Close">…</button>
|
|
181
|
-
<input placeholder="Email">
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
Do not add conflicting ARIA, positive tabindex, native-activation duplicates, alert roles on every error-looking block, or raw tool JSON as the only AI description.
|
|
185
|
-
|
|
186
|
-
## 16. Testing commands
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
npm run check:tokens
|
|
190
|
-
npm run check:a11y
|
|
191
|
-
npm test
|
|
192
|
-
npm run test:browser
|
|
193
|
-
npm run build
|
|
194
|
-
npm pack --dry-run
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
Browser tests use Chromium, Playwright and `@axe-core/playwright`. Automation does not replace keyboard, zoom/reflow, forced-colors, speech input, switch control, or screen-reader tests.
|
|
198
|
-
|
|
199
|
-
## 17. Manual test checklist
|
|
200
|
-
|
|
201
|
-
- Traverse journeys with Tab/Shift+Tab and pattern keys; verify focus/order.
|
|
202
|
-
- Test modal nesting, containment, Escape ownership, restoration and isolation.
|
|
203
|
-
- Test NVDA + Firefox/Chrome and VoiceOver + Safari for name/role/value/description/live timing.
|
|
204
|
-
- Test 200% zoom and 400% reflow, text spacing, long Swedish labels, Arabic/mixed direction (RTL fixes deferred).
|
|
205
|
-
- Test Windows High Contrast/forced colors; verify selection, error, icons and focus without background hue.
|
|
206
|
-
- Test reduced motion, grid/calendar operations, form recovery, offline/error/loading and AI consequences.
|
|
207
|
-
- Verify every image/icon, dynamic ID reference and composed application example.
|
|
208
|
-
|
|
209
|
-
## 18. Known limitations
|
|
210
|
-
|
|
211
|
-
- Formal screen-reader interoperability and mobile gestures require manual application testing.
|
|
212
|
-
- No complete combobox/command-palette controller is shipped; use a conforming implementation or native select.
|
|
213
|
-
- Data-grid editing/resizing/virtualization remain application-specific; shared behavior covers navigation/selection/sort.
|
|
214
|
-
- Calendar drag/resize/collision/time-grid navigation require host keyboard alternatives.
|
|
215
|
-
- Tooltip lifecycle remains consumer-owned; toast timeout pause has a shared controller.
|
|
216
|
-
- Responsive adaptation preserves accessibility invariants: content hidden by adaptive modes uses `display: none` (never focusable-but-invisible), table/record-list alternatives render one at a time, scrollable table regions carry `tabindex="0"` and an accessible name, coarse pointers expand compact controls to the documented target sizes, and hover-revealed actions stay visible on touch and keyboard (`.nt-hover-reveal` contract). See [responsive-and-adaptive-design.md](./responsive-and-adaptive-design.md).
|
|
217
|
-
- State recovery still requires application-owned backend/router behavior; final product copy follows [content-and-terminology.md](./content-and-terminology.md).
|
|
218
|
-
- Axe and semantic checks cover representative contracts, not every consumer content/color/image combination.
|
|
1
|
+
# Accessibility contract
|
|
2
|
+
|
|
3
|
+
Localization does not weaken this contract. Set correct `lang`/`dir`, provide complete accessible names in the active language, isolate technical values without changing their spoken label, and test visual keyboard order in RTL. Native Arabic screen-reader QA remains an application responsibility; see [localization-and-rtl.md](./localization-and-rtl.md).
|
|
4
|
+
|
|
5
|
+
`@neetechs/ui` targets WCAG 2.2 Level AA as its engineering baseline. This is not a certification: applications must still test their content, routing, framework integration, localization, screen-reader experience, and complete user journeys.
|
|
6
|
+
|
|
7
|
+
The package is CSS-first. CSS classes provide appearance; they cannot repair incorrect HTML. The behavior exports under `@neetechs/ui/behaviors` add only relationships and interactions that require JavaScript. Consumers remain responsible for meaningful labels and product-specific descriptions.
|
|
8
|
+
|
|
9
|
+
## 1. Baseline requirements
|
|
10
|
+
|
|
11
|
+
- Normal text is at least 4.5:1; large text and meaningful non-text boundaries are at least 3:1.
|
|
12
|
+
- Keyboard focus uses `:focus-visible`, a 2px semantic ring, and a 2px offset. Never remove an outline without a replacement in the same rule.
|
|
13
|
+
- Primary and icon-only controls expose a 44×44px target. Dense contextual controls expose at least 40×40px. Inline text links, browser-native controls, tightly packed data points, and controls whose spacing provides an equivalent compound target are documented exceptions.
|
|
14
|
+
- Native HTML is preferred. Do not replace a `button`, `a`, `input`, `select`, `textarea`, `table`, `fieldset`, or heading with a generic element plus ARIA.
|
|
15
|
+
- Light/dark × orange/blue/green/purple/neutral semantic contrast is enforced by `npm run check:a11y`.
|
|
16
|
+
- High contrast and forced colors layer over light or dark. Reduced motion removes decorative travel/lift and preserves state feedback.
|
|
17
|
+
|
|
18
|
+
## 2. Native HTML and accessible names
|
|
19
|
+
|
|
20
|
+
Use visible text as the accessible name whenever possible. Icon-only controls require a concise `aria-label` or associated visible label. `title` is supplementary, not the only naming strategy. Images use meaningful `alt`, empty `alt` when decorative, or a nearby text alternative for complex graphics. Decorative SVGs are `aria-hidden="true"`; meaningful SVGs inherit `currentColor` and are named by surrounding content.
|
|
21
|
+
|
|
22
|
+
Labels describe the control, while `aria-describedby` connects helper, constraint, consequence, and error copy. Placeholder text is never the only label. Do not repeat visible text in `aria-label`; that can override better content.
|
|
23
|
+
|
|
24
|
+
## 3. Component accessibility inventory
|
|
25
|
+
|
|
26
|
+
Prompt 7 consolidation note: modal CSS and `ntCreateModal` now delegate to the canonical dialog implementation; the right-drawer path/classes delegate to canonical logical drawer CSS; company/workspace switchers share one visual source and the menu-popover behavior. These compatibility names do not define separate accessibility contracts. The table export is now a styled native-table contract and remains intentionally separate from the interactive data grid. See [component-architecture.md](./component-architecture.md).
|
|
27
|
+
|
|
28
|
+
Prompt 8 state note: operation state now uses native semantics plus `data-nt-state` where needed; content-region state uses `data-nt-content-state`; legacy `--loading`, `--error`, and `--success` modifiers are styling compatibility hooks. See [states-feedback-and-recovery.md](./states-feedback-and-recovery.md).
|
|
29
|
+
|
|
30
|
+
The inventory covers all 59 shipped UI/domain CSS modules. “Gallery” means the representative Playwright/axe contract gallery; “manual” identifies an application-level check still required.
|
|
31
|
+
|
|
32
|
+
| Component and source | Semantic/name contract | Keyboard and focus | State/feedback contract | Target, modes, coverage and residual risk |
|
|
33
|
+
|---|---|---|---|---|
|
|
34
|
+
| Alert — `src/components/alert/alert.css` | Static notice: section/region; urgent dynamic error: `role=alert`; routine update: `role=status`; heading names region | Actions are native controls; no container tab stop | Severity is text/icon plus color; recovery action is named | Actions 40/44; forced-color border; gallery. Urgency choice remains manual |
|
|
35
|
+
| Avatar — `src/components/avatar/avatar.css` | Decorative avatar has empty alt/hidden initials; informative image has person/org name | Not focusable unless a native link/button wrapper | Presence/status needs text alternative | CurrentColor boundary; manual image-alt review |
|
|
36
|
+
| Badge — `src/components/badge/badge.css` | Text span; status role only for a dynamic update | Not focusable unless interactive variant is a button | Status wording must not rely on hue | Forced-color boundary; semantic contrast; manual copy review |
|
|
37
|
+
| Breadcrumb — `src/components/breadcrumb/breadcrumb.css` | `nav aria-label="Breadcrumb"`, ordered list, current item `aria-current=page` | Native links; visible focus | Current page is not a dead unlabeled link | Inline-link target exception; structure manual |
|
|
38
|
+
| Button — `src/components/button/button.css` | Native `button`; visible text is name; busy keeps original name and uses `aria-busy` | Native Enter/Space; no redundant handlers | Native `disabled`; `aria-disabled` requires activation guard; loading prevents repeat | Primary 44; focus/contrast/motion/forced colors tested |
|
|
39
|
+
| Card — `src/components/card/card.css` | Article/section only with a heading; clickable card uses one real link/button, not nested controls | Only actual actions focus | Selected cards use `aria-selected` only in a selection widget | Reduced lift; selected outline in forced colors; structure manual |
|
|
40
|
+
| Checkbox — `src/components/checkbox/checkbox.css` | Native checkbox inside label; groups use fieldset/legend | Native Space | `checked`, `indeterminate`, `disabled`, required/error on input | 40px row; system-color forced mode; gallery/axe |
|
|
41
|
+
| Chip — `src/components/chip/chip.css` | Static tag is text; removable/choice chip uses native button and named remove action | Native activation; composite owner manages arrows | `aria-pressed`/`aria-selected`; disabled guard | 40px interactive target; composite behavior app-owned |
|
|
42
|
+
| Data grid — `src/components/data-grid/data-grid.css`, `src/behaviors/data-grid.ts` | Prefer semantic table. Opt-in `role=grid` only for 2-D interaction; headers name columns; help describes keys | Roving arrows, Home/End, Ctrl+Home/End, activation callback | `aria-sort`, `aria-selected`, disabled; polite sort live region | Visible focus/selection; browser tested. Editing/resize policy app-specific |
|
|
43
|
+
| Dialog — `src/components/dialog/dialog.css`, `src/behaviors/dialog.ts` | Dialog role/modal state/title and optional description references | Intentional initial focus, Tab trap, Escape if dismissible, restore invoker | Background inert, scroll locked, hidden closed, nested-stack aware | Boundary/focus forced colors; nested browser test; SR manual |
|
|
44
|
+
| Drawer — `src/components/drawer/drawer.css`, `src/behaviors/drawer.ts` | Explicit modal dialog or nonmodal region/navigation | Modal traps/restores; nonmodal follows page order; top overlay owns Escape | Modal background inert; role/modal match declared modality | Reduced travel/forced boundary; nested browser test |
|
|
45
|
+
| Dropdown — `src/components/dropdown/dropdown.css`, `src/behaviors/dropdown.ts` | Trigger button with popup/expanded/controls; content is menu or listbox, not both | Arrow open/navigation, Home/End, typeahead, activation, Escape returns trigger; no Tab trap | Disabled items skipped/blocked; closed content hidden | Items 40px; browser tested. Listbox value sync consumer-owned |
|
|
46
|
+
| Icon button — `src/components/icon-button/icon-button.css` | Native button with required accessible name | Native activation; visible focus | Disabled/loading as button | 44px default, 40px compact; browser measured |
|
|
47
|
+
| Input — `src/components/input/input.css`, `src/behaviors/forms.ts` | Visible label; stable help/error IDs | Native editing and focus | required, invalid, disabled, readonly, busy distinct | 40px minimum; contrast/focus/axe |
|
|
48
|
+
| Menu — `src/components/menu/menu.css`, dropdown behavior | Menu only for application commands; navigation remains nav/links | Up/Down, Home/End, typeahead, activation, Escape; no Tab trap | Disabled items skipped/blocked; checked command roles where needed | 40px; browser tested through dropdown |
|
|
49
|
+
| Modal compatibility - `@neetechs/ui/components/modal.css`, `ntCreateModal` | Deprecated aliases to canonical dialog CSS/behavior; identical naming requirement | Same canonical trap/restore contract | Adapter forces `modal: true`; no second focus manager | Architecture-tested; migrate to dialog before 1.0 |
|
|
50
|
+
| Pagination — `src/components/pagination/pagination.css` | Labelled nav; native links/buttons; current page `aria-current=page` | Native activation/sequence | Disabled previous/next native or non-link text | 40×40; forced selected outline; structure manual |
|
|
51
|
+
| Panel — `src/components/panel/panel.css` | Section/aside only when landmark/heading is useful | Actions only | Loading may set `aria-busy` on panel | Semantic boundary; structure manual |
|
|
52
|
+
| Progress — `src/components/progress/progress.css` | Native progress or named progressbar with value/min/max; indeterminate has status text | Not focusable | Announce milestones, not every frame | Motion reduced without losing state; cadence manual |
|
|
53
|
+
| Radio — `src/components/radio/radio.css` | Native radios in fieldset/legend | Native arrows/Space | checked/disabled/required/error on input | 40px row; forced colors; gallery/axe |
|
|
54
|
+
| Segmented control — `src/components/segmented-control/segmented-control.css` | Radio group for exclusive value or toolbar of buttons for commands; label group | Native radios or documented roving behavior | checked/pressed/disabled explicit | Focus/selected distinct; role choice manual |
|
|
55
|
+
| Select — `src/components/select/select.css` | Native label + select unless complete combobox implemented | Native browser behavior | disabled/required/invalid; native select has no readonly | 40px; contrast/focus/axe |
|
|
56
|
+
| Skeleton — `src/components/skeleton/skeleton.css` | Decorative skeleton hidden; containing region busy with readable status | Not focusable | Real content replaces skeleton; no repeated announcements | Animation suppressed; gallery loading pattern |
|
|
57
|
+
| Split button — `src/components/split-button/split-button.css` | Two named native buttons: action and disclosure | Native action; disclosure follows menu contract | Disabled/loading coherent across both | 40/44 by action; composition manual |
|
|
58
|
+
| Switch — `src/components/switch/switch.css` | Prefer native checkbox; custom switch requires checked state and label | Native Space | checked/disabled; no mixed state | 40px row; forced colors; gallery/axe |
|
|
59
|
+
| Table — `src/components/table/table.css` | Native table/caption/scope headers; no grid role for display-only data | Standard AT table navigation | Sort buttons inside headers and announce state | Overflow response deferred; markup manual |
|
|
60
|
+
| Tabs — `src/components/tabs/tabs.css`, `src/behaviors/tabs.ts` | tablist/tab/tabpanel with generated controls/labelledby IDs | Orientation arrows, Home/End, one tab stop; automatic/manual declared | selected/disabled/hidden panel synchronized | 40px; focus/forced selection; browser tested |
|
|
61
|
+
| Textarea — `src/components/textarea/textarea.css` | Visible label and descriptions | Native editing | readonly readable/focusable; disabled/invalid distinct | 40px; contrast/focus/axe |
|
|
62
|
+
| Toast — `src/components/toast/toast.css`, `src/behaviors/announcer.ts` | Routine status; urgent error alert; named close | No automatic focus; close keyboard accessible; timed toast pauses hover/focus | Critical content persists; status wording explicit | Gallery semantics; `ntCreateToastController` covers timers, dedupe, stack limit, pause, and cleanup |
|
|
63
|
+
| Tooltip — `src/components/tooltip/tooltip.css` | Tooltip role/stable describedby; never sole essential content | Opens focus/hover; Escape dismissal when behavior exists; no interactive children | Hidden tooltip not exposed | Reduced motion/forced text; lifecycle consumer-owned |
|
|
64
|
+
| AI action button — `src/ai/ai-action-button/ai-action-button.css` | Named native button; name states action, not only “AI” | Native activation | Busy preserves name, blocks repeat, exposes status | 44px; independent AI contrast; reduced motion |
|
|
65
|
+
| AI approval card — `src/ai/ai-approval-card/ai-approval-card.css` | Heading names card; description states intent, target, consequence, reversibility | Native reject/approve; safe action first | Pending/status polite; confirmation/success/failure explicit | Gallery/axe/actions; product copy/workflow manual |
|
|
66
|
+
| AI conversation panel — `src/ai/ai-conversation-panel/ai-conversation-panel.css` | Named region/log; messages identify speaker; streaming status separate | Normal document/controls order | New content polite/batched; do not reread transcript | Streaming behavior app-owned |
|
|
67
|
+
| AI prompt input — `src/ai/ai-prompt-input/ai-prompt-input.css` | Labelled textarea/input; named send/attachment | Native editing; multiline Enter preserved unless policy declared | Busy/error/counter associated without chatter | Controls 40/44; policy manual |
|
|
68
|
+
| AI proposal card — `src/ai/ai-proposal-card/ai-proposal-card.css` | Heading + proposal description; buttons name consequences | Native actions | Approval not inferred from purple; explicit status | Focus/contrast; workflow manual |
|
|
69
|
+
| AI suggestion card — `src/ai/ai-suggestion-card/ai-suggestion-card.css` | List/article with descriptive suggestion action | Native action; owning widget handles arrows if selection composite | Accepted/rejected text plus status | Focus/selection/contrast; list behavior manual |
|
|
70
|
+
| AI tool call — `src/ai/ai-tool-call/ai-tool-call.css` | Human-readable operation/target/status; raw JSON optional detail | Disclosure button for collapsed detail | Running/success/failure at meaningful transitions | Status contrast; descriptions manual |
|
|
71
|
+
| Billing — `src/domain/billing/index.css` | Semantic tables/lists/forms; amounts include currency/sign in text | Native actions/table navigation | Financial sign never color-only; errors use form contract | Financial tokens; localization audit deferred |
|
|
72
|
+
| Companies — `src/domain/companies/index.css` | Named company list/region; logos follow avatar rules; actions are native | Native list actions; switcher menu uses shared behavior | Active company, role, permission, and availability use text/ARIA plus visual state | Focus/target/forced colors; product permissions and names manual |
|
|
73
|
+
| Calendar day slice — `src/domain/calendar/day-slice/day-slice.css` | Named time-grid; events named with title/time | Application declares arrows or normal Tab, not both | Current/selected time text/ARIA, not color only | Focus/forced/reduced; core grid browser tested |
|
|
74
|
+
| Calendar timeline — `src/domain/calendar/day-timeline/day-timeline.css` | Time labels/events expose start/end | Event keyboard path documented by app | Current time/category needs non-color text | Drag/resize keyboard alternative app-specific |
|
|
75
|
+
| Calendar event card — `src/domain/calendar/event-card/event-card.css` | Native link/button with event name/time/category | Native activation; menu uses shared behavior | selected/current/cancelled text/ARIA plus visual | 44 primary; compact context exception; copy manual |
|
|
76
|
+
| Calendar month grid — `src/domain/calendar/month-grid/month-grid.css`, calendar behavior | Grid rows/cells; full date spoken label; today current date | ±1/±7 arrows, Home/End, one tab stop | selection state; range polite live region | 44px behavior hook; browser tested |
|
|
77
|
+
| Calendar week grid — `src/domain/calendar/week-grid/week-grid.css`, calendar behavior | Named grid/time-grid and full event names | Declared grid or event Tab model | current/selected not color-only | Focus/forced; complex navigation manual |
|
|
78
|
+
| Command palette — `src/patterns/command-palette/command-palette.css` | Modal dialog with labelled combobox/listbox | Input arrows/Home/End/Enter/Escape; modal trap/restore | Loading/empty readable; active descendant when input retains focus | Complete combobox controller is a known limitation |
|
|
79
|
+
| Company switcher — `src/patterns/company-switcher/company-switcher.css` | Disclosure + menu/listbox chosen by command vs value | Shared dropdown keyboard | Selected company/unavailable explicit | 40px/shared browser behavior; content manual |
|
|
80
|
+
| Content state — `src/patterns/content-state/content-state.css` | Heading/description/native recovery; urgency chosen by context | Native action; no automatic focus unless recovering from failed submission | `data-nt-content-state` differentiates loading, empty, error, offline, permission, not-found, maintenance, success | Target/focus/contrast/RTL; manual content |
|
|
81
|
+
| Empty state — `src/patterns/empty-state/empty-state.css` | Legacy pattern over content-state guidance; heading/description/native recovery; no alert | Native action | Static absence is not urgent | Compatible; prefer `.nt-content-state` for new work |
|
|
82
|
+
| Error state — `src/patterns/error-state/error-state.css` | Legacy pattern over content-state guidance; heading/recovery/action; alert only dynamically urgent | Native action | Reason/recovery not icon/color only | Compatible; prefer `.nt-content-state` for new work |
|
|
83
|
+
| Loading state — `src/patterns/loading-state/loading-state.css` | Legacy pattern over content-state guidance; named status; affected region busy; skeleton hidden | Do not move/strand focus | Announce start/end or milestones only | Compatible; prefer `.nt-content-state` for new work |
|
|
84
|
+
| Notification center — `src/patterns/notification-center/notification-center.css` | Named region/list; item heading/time/read state | Native actions; optional menu shared | Unread text/ARIA plus color; updates polite | Focus/forced color; update behavior manual |
|
|
85
|
+
| Profile menu — `src/patterns/profile-menu/profile-menu.css` | Trigger + command menu | Shared dropdown menu | Disabled/current account explicit | Shared browser menu; names manual |
|
|
86
|
+
| Search bar — `src/patterns/search-bar/search-bar.css` | Search landmark/form, labelled input, named clear/submit | Native editing/submission; Escape clear only if declared | Loading/results count polite; clear updates value | Focus/targets; results combobox not provided |
|
|
87
|
+
| Workspace switcher - `@neetechs/ui/patterns/workspace-switcher.css` | Disclosure + menu/listbox chosen by purpose; shared entity-switcher CSS | Shared menu-popover behavior | Selected workspace explicit | Shared browser behavior; rich content semantics remain consumer-owned |
|
|
88
|
+
| App shell — `src/shell/app-shell/app-shell.css` | Header/nav/main/aside landmarks, one main, app supplies skip link | Logical DOM order; no positive tabindex | Busy main does not indefinitely inert nav | Global focus/motion; landmarks manual |
|
|
89
|
+
| Content frame — `src/shell/content-frame/content-frame.css` | Main/section with heading hierarchy | Normal order | Loading/error use pattern contracts | Noninteractive; heading audit manual |
|
|
90
|
+
| Header — `src/shell/header/header.css` | Header landmark; labelled nav | Native controls and skip target | Expanded menus reflect state | Focus/target/forced; composition manual |
|
|
91
|
+
| Mobile nav — `src/shell/mobile-nav/mobile-nav.css` | Labelled nav; current link; overlay version uses drawer contract | Native links; modal traps/restores | open/closed and isolation explicit | 40px/reduced motion; responsive redesign deferred |
|
|
92
|
+
| Right-drawer compatibility - `@neetechs/ui/shell/right-drawer.css` | Deprecated classes/path map to canonical logical drawer; declare modal/nonmodal role | Shared drawer contract | Same modality/state rules | Migrate to inline-end drawer; nested overlay test covers canonical behavior |
|
|
93
|
+
| Sidebar — `src/shell/sidebar/sidebar.css` | Labelled nav/aside; current link | Native links/disclosures | Collapsed items remain named | 40px/focus/forced; responsive deferred |
|
|
94
|
+
|
|
95
|
+
## 4. Keyboard interaction table
|
|
96
|
+
|
|
97
|
+
| Pattern | Required keys |
|
|
98
|
+
|---|---|
|
|
99
|
+
| Button | Enter and Space through native behavior |
|
|
100
|
+
| Link | Enter through native behavior |
|
|
101
|
+
| Menu | Up/Down, Home/End, typeahead, Enter/Space, Escape; Tab exits rather than traps |
|
|
102
|
+
| Tabs | Left/Right or Up/Down by orientation, Home/End; activation mode declared |
|
|
103
|
+
| Modal dialog | Tab and Shift+Tab stay inside; Escape closes only when dismissal is allowed and only the top overlay |
|
|
104
|
+
| Grid | Arrows; Home/End row bounds; Ctrl+Home/End grid bounds; consumer activation |
|
|
105
|
+
| Calendar | Left/Right one day, Up/Down one week, Home/End week bounds |
|
|
106
|
+
| Native form controls | Browser-native behavior; no duplicate activation handlers |
|
|
107
|
+
|
|
108
|
+
## 5. Focus management and overlays
|
|
109
|
+
|
|
110
|
+
`ntCreateDialog` and modal `ntCreateDrawer` set role/name/description relationships, unhide before focus, isolate background branches with `inert`, lock scroll with reference counting, trap focus, and restore the connected invoker after inert state is removed. Overlay and focus stacks ensure Escape and Tab affect only the top nested overlay. `destroy()` removes listeners and locks.
|
|
111
|
+
|
|
112
|
+
Initial focus should be the least destructive useful control, a heading/container for long content, or the first invalid field. Destructive confirmation is not the default. Nonmodal drawers use `modal: false` and `role: 'region'` or `'navigation'`; they do not trap or inert. Portaled overlays must keep the active modal/backdrop outside inert branches.
|
|
113
|
+
|
|
114
|
+
## 6. Forms, validation, and error summaries
|
|
115
|
+
|
|
116
|
+
```html
|
|
117
|
+
<label id="email-label" for="email">Email <span aria-hidden="true">*</span></label>
|
|
118
|
+
<input id="email" required aria-describedby="email-help email-error" aria-invalid="true">
|
|
119
|
+
<p id="email-help">Use your work address.</p>
|
|
120
|
+
<p id="email-error">Enter a valid email address.</p>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`ntConnectField()` establishes stable IDs and relationships but cannot invent labels or recovery copy. Native `required`, `disabled`, and `readonly` remain authoritative where supported. Read-only fields remain readable/selectable and may stay focusable; disabled controls do not activate and ordinarily leave the Tab sequence.
|
|
124
|
+
|
|
125
|
+
An error summary is a named region with heading and links to invalid fields. Reveal it, then call `ntFocusErrorSummary()`. Avoid combining focus movement with assertive announcement unless interruption is required. Password reveal controls name the action and state; clear buttons name the field; counters announce thresholds, not every keystroke.
|
|
126
|
+
|
|
127
|
+
## 7. Feedback, loading, and live regions
|
|
128
|
+
|
|
129
|
+
- Routine success/update: `role=status`, `aria-live=polite`.
|
|
130
|
+
- Immediate actionable failure: `role=alert`; not for static empty states.
|
|
131
|
+
- Long operation: `aria-busy=true` on the affected region plus concise status text; batch progress.
|
|
132
|
+
- Toasts never take focus automatically. Timed toasts pause while hovered/focused; critical content persists elsewhere.
|
|
133
|
+
- Skeleton geometry is hidden from AT; a readable sibling communicates loading.
|
|
134
|
+
|
|
135
|
+
Use `ntCreateAnnouncer()` for application messages and destroy it at teardown. `ntConfigureToastSemantics()` selects polite or assertive semantics intentionally. Use `ntCreateToastController()` when the package-owned DOM controls toast timers, dedupe, stack limits, pause-on-hover/focus, and cleanup.
|
|
136
|
+
|
|
137
|
+
## 8. Disabled, read-only, selected, and loading
|
|
138
|
+
|
|
139
|
+
Disabled means unavailable/noninteractive; prefer native disabled. `aria-disabled=true` does not block events, so behavior must guard activation. Read-only means readable but not editable and must not look identical to disabled. Selected uses the owning pattern's selected/checked/pressed/current state and a boundary that survives forced colors. Focus remains distinct. Loading/pending is not disabled: it preserves the name, exposes busy, prevents repeat activation, and keeps focus stable. `ntCreateAsyncAction()` implements that contract for action controls.
|
|
140
|
+
|
|
141
|
+
## 9. Contrast and focus tokens
|
|
142
|
+
|
|
143
|
+
Components consume `--nt-focus-ring-width`, `--nt-focus-ring-offset`, `--nt-focus-ring-color`, `--nt-focus-ring-danger`, and `--nt-focus-ring-inverse`. Target roles are `--nt-target-size-primary`, `--nt-target-size-default`, and `--nt-target-size-compact`.
|
|
144
|
+
|
|
145
|
+
`scripts/check-accessibility.mjs` resolves 14 semantic pairs across light/dark and five accents (140 measurements). It enforces 4.5:1 text, 3:1 focus/control boundaries, rejects unsafe outline removal, and requires forced-colors/reduced-motion layers. It tests semantic contracts instead of brittle full CSS snapshots.
|
|
146
|
+
|
|
147
|
+
## 10. High contrast and forced colors
|
|
148
|
+
|
|
149
|
+
Manual high contrast strengthens boundaries and disables shadow-only elevation. In forced colors, controls retain system boundaries, links use `LinkText`, selection/current state gains a `Highlight` outline, and icons inherit `currentColor`. `forced-color-adjust: none` is not used. Custom checkbox/radio/switch visuals preserve the native input and system state.
|
|
150
|
+
|
|
151
|
+
## 11. Reduced motion
|
|
152
|
+
|
|
153
|
+
The central layer and component rules remove decorative lift, scale, spinner, long drawer/dialog travel, and smooth scrolling under system or manual reduced motion. Short color/state changes may remain. Loading retains text/busy feedback when animation stops.
|
|
154
|
+
|
|
155
|
+
## 12. Data-grid guidance
|
|
156
|
+
|
|
157
|
+
Use a semantic table for read-only data. Use `ntCreateDataGrid()` only for spreadsheet-like 2-D navigation. It supplies roving focus, bounds navigation, selection callbacks, and sort announcements; applications define editing, selection model, virtualization, resize increments, and undo. Resize handles are named focusable controls with arrow increments and final announcements.
|
|
158
|
+
|
|
159
|
+
## 13. Calendar guidance
|
|
160
|
+
|
|
161
|
+
`ntCreateCalendarGrid()` supplies one-tab-stop date navigation and range announcements. Dates/events need full spoken labels including date and time. Today is `aria-current=date`; selection is `aria-selected`; they are visually distinct. Category/availability/conflict needs non-color alternatives. Drag/drop and resize need host keyboard alternatives.
|
|
162
|
+
|
|
163
|
+
## 14. AI approval guidance
|
|
164
|
+
|
|
165
|
+
Approval states what Neenee will do, which record/system changes, reversibility, confirmation requirement, and pending/success/failure result. Actions name consequences, such as “Approve and create event”. Safe/reject/review precedes destructive approval absent a documented reason. Purple identifies AI origin; status semantics describe consequences.
|
|
166
|
+
|
|
167
|
+
## 15. Correct and incorrect patterns
|
|
168
|
+
|
|
169
|
+
Correct:
|
|
170
|
+
|
|
171
|
+
```html
|
|
172
|
+
<button class="nt-icon-button" aria-label="Close invoice details">…</button>
|
|
173
|
+
<button aria-expanded="false" aria-controls="account-menu">Account menu</button>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Incorrect:
|
|
177
|
+
|
|
178
|
+
```html
|
|
179
|
+
<div class="nt-button" onclick="save()">Save</div>
|
|
180
|
+
<button class="nt-icon-button" title="Close">…</button>
|
|
181
|
+
<input placeholder="Email">
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Do not add conflicting ARIA, positive tabindex, native-activation duplicates, alert roles on every error-looking block, or raw tool JSON as the only AI description.
|
|
185
|
+
|
|
186
|
+
## 16. Testing commands
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
npm run check:tokens
|
|
190
|
+
npm run check:a11y
|
|
191
|
+
npm test
|
|
192
|
+
npm run test:browser
|
|
193
|
+
npm run build
|
|
194
|
+
npm pack --dry-run
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Browser tests use Chromium, Playwright and `@axe-core/playwright`. Automation does not replace keyboard, zoom/reflow, forced-colors, speech input, switch control, or screen-reader tests.
|
|
198
|
+
|
|
199
|
+
## 17. Manual test checklist
|
|
200
|
+
|
|
201
|
+
- Traverse journeys with Tab/Shift+Tab and pattern keys; verify focus/order.
|
|
202
|
+
- Test modal nesting, containment, Escape ownership, restoration and isolation.
|
|
203
|
+
- Test NVDA + Firefox/Chrome and VoiceOver + Safari for name/role/value/description/live timing.
|
|
204
|
+
- Test 200% zoom and 400% reflow, text spacing, long Swedish labels, Arabic/mixed direction (RTL fixes deferred).
|
|
205
|
+
- Test Windows High Contrast/forced colors; verify selection, error, icons and focus without background hue.
|
|
206
|
+
- Test reduced motion, grid/calendar operations, form recovery, offline/error/loading and AI consequences.
|
|
207
|
+
- Verify every image/icon, dynamic ID reference and composed application example.
|
|
208
|
+
|
|
209
|
+
## 18. Known limitations
|
|
210
|
+
|
|
211
|
+
- Formal screen-reader interoperability and mobile gestures require manual application testing.
|
|
212
|
+
- No complete combobox/command-palette controller is shipped; use a conforming implementation or native select.
|
|
213
|
+
- Data-grid editing/resizing/virtualization remain application-specific; shared behavior covers navigation/selection/sort.
|
|
214
|
+
- Calendar drag/resize/collision/time-grid navigation require host keyboard alternatives.
|
|
215
|
+
- Tooltip lifecycle remains consumer-owned; toast timeout pause has a shared controller.
|
|
216
|
+
- Responsive adaptation preserves accessibility invariants: content hidden by adaptive modes uses `display: none` (never focusable-but-invisible), table/record-list alternatives render one at a time, scrollable table regions carry `tabindex="0"` and an accessible name, coarse pointers expand compact controls to the documented target sizes, and hover-revealed actions stay visible on touch and keyboard (`.nt-hover-reveal` contract). See [responsive-and-adaptive-design.md](./responsive-and-adaptive-design.md).
|
|
217
|
+
- State recovery still requires application-owned backend/router behavior; final product copy follows [content-and-terminology.md](./content-and-terminology.md).
|
|
218
|
+
- Axe and semantic checks cover representative contracts, not every consumer content/color/image combination.
|