diff --git a/CLAUDE.md b/CLAUDE.md index 8ebf5ba..bdaf1db 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,12 +38,15 @@ Accessibility is a contractual acceptance criterion. It covers the whole UI: nav - ``: unnamed `role="switch"`. Use `resources/views/partials/theme-toggle.blade.php`, which drives `tallstackui_darkTheme({ default: 'system' })` on `` (localStorage `dark-theme`; an inline script in the layout applies it before paint). - ``: root-relative asset URLs that 404 in a subfolder (local XAMPP). The layout includes `resources/views/partials/tallstackui-script.blade.php` instead. - ``: the label is not tied to the control, so also pass `:aria-label` with the same text. + - ``: `aria-labelledby` points at an id its title lacks, the close button has no name, and focus neither moves in nor returns. Use `` (`resources/views/components/confirm-dialog.blade.php`, native `` + `showModal()`), opened from Livewire with `$this->js("document.getElementById('').showModal()")`; see `customers::show`. + - Solid `color="red"` buttons: white on red-500 is 3.5:1, so the solid red is red-700 in the published `NormalButtonColors`. - `` without `wire:model` (e.g. a read-only value): pass an explicit `id`, or the label is not tied to it. `` has an unlabelled input and a button whose name changes; build copy fields from `` + `` + a `role="status"` message instead (see `users::form`). - Contrast: the primary palette is one step darker (`resources/css/app.css`); error text, label error and asterisk, and input/select error colours are changed by soft customization in `App\Providers\AppServiceProvider`; light alert and link text colours are in published colour classes `app/View/Components/TallStackUi/Colors/`. `flat` and `outline` buttons have no dark-mode text colour: use `subtle color="black"` for neutral buttons. - Finnish strings for TallStackUI's own components are in `lang/vendor/ts-ui/fi/messages.php`. +- **Personal identity codes** (*henkilötunnus*, consumer customers) are sensitive personal data: stored encrypted (`encrypted` cast, `$hidden`) with an HMAC blind index for duplicates, never in `CustomerSummary`, search, logs, exception messages or Livewire public properties, and shown in full only behind `customers.view-personal-identity-code` (admin, management) via `CustomerQueries::personalIdentityCodeOf()`; everyone else sees `masked()`. - Never convey meaning by colour alone. Statuses, priorities (e.g. *kiire* = red), errors and warnings always also have visible text or an icon with text. - Announce dynamic changes: put status text in `role="status"` / `aria-live="polite"` (errors: `role="alert"`), or a TallStackUI toast (`` must then be added to the layout). Keep button names stable instead of putting changing state in them. -- Make everything work with the keyboard alone, with a visible focus indicator and no focus traps. Use `` for dialogs and check that focus moves in and returns. +- Make everything work with the keyboard alone, with a visible focus indicator and no focus traps. Use `` for dialogs (not ``, see above) and check that focus moves in and returns. - The layout (`resources/views/layouts/app.blade.php`) provides a skip link and a `
` landmark. Keep them, and add `