Repository navigation
Feat/dmj gaps 8 - #65
Merged
Merged
Conversation
With Tailwind v4 outline-none also sets --tw-outline-style: none, and focus-visible:outline-2 only sets the width and takes the style from that variable - the focus ring was active but invisible (WCAG 2.4.7). Found on the SidebarNav link; 22 parts had the combination. outline-hidden would not help, it sets the same variable. - Drop the redundant outline-none where a part draws its own focus ring (the browser outline only shows at :focus-visible, which they style) - Test over all recipes: no focus outline width next to outline-none without an outline style Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
On opening, the dialog resolved only data-autoselect itself; data-autofocus went to Ark, which skips a wrapper that cannot take the focus - the close button got it. focusFirst() and the docs promise the wrapper works. - autoselectElement resolves data-autoselect, data-autofocus and autofocus like focusFirst (a wrapper gives its first tabbable element); the text is selected only with data-autoselect - Story "Initial focus on a component" (Listbox with filter) and a browser test; unit test for the wrapper (jsdom cannot open-focus Ark) Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
SegmentedControlItem always rendered its item text next to the icon; a name for screen readers only (an sr-only span in the slot) left the text part a flex item, and the item's gap pushed the icon off centre. - label: the text of the segment without a slot; with icon and label but no slot only the icon shows, centred, the label names it (sr-only) - Recipe variant iconOnly (no gap) and slot itemText; segments with text keep their DOM - Behaviour test (name, sr-only, gap), parity case, story "Icon only" Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
Focused fields showed the focus only as a 1 px primary border: WCAG 2.4.7, but in the DMJ UX test hardly different from the resting state, and short of 2.4.13 (2 px, 3:1 between focused and unfocused). - Every focus:/focus-within:/focus-visible:border-primary of the field recipes gets a 2 px primary outline at -outline-offset-3: right inside the border, so nothing cuts it off, on the field surface (primary on the surfaces is checked by the theme test) - outline-solid where the slot has outline-none (the focus ring test keeps that so) Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
The CSV, Excel and print of a TreeTable always had every row of the tree.
When parents only sum up their children ("Person - 2 licences" above the
licences), the export had those rows twice; the page could not leave
them out without rebuilding the table's search, filters and sorting.
- Prop exportRows: 'all' (default) | 'leaves'; option rows of
generateCsv/exportCsv, generateXlsx/exportXlsx and print, which wins
- A leaf has no children in the data (getSubRows), not just no matching
ones; filtered and sorted like the table; selectionOnly unaffected
- Tests for CSV, Excel and print with and without a filter (lenient),
story "Tree export", docs in the export section
Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
…nput
There was no building block that asks before a page with unsaved form
input is left (route change, reload, closing the tab). Apps built it
from a router guard, beforeunload and confirm(); several forms on a page
then easily asked several times.
- useUnsavedChanges(isDirty, { message? }) in the Vue and React form
subpaths; all forms share one list: one confirm() however many changed,
beforeunload only while one is changed, unregistered on unmount
- Router independent: unsavedChangesGuard(to, from) (Vue Router:
router.beforeEach), only the query or hash changing does not ask;
confirmLeave() for own links
- Text unsavedChanges.leave in every language; docs with TanStack Form
(!state.isDefaultValue, form.reset(values) after saving)
- Tests: two changed forms ask once, cancel stays, query change, no
changes, beforeunload, unmount
Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
In several field slots outline-none and the focus border sit in different strings of the same slot (Select, MultiSelect, TreeSelect and Tree search, Listbox, NativeSelect, PinInput, ColorPicker inputs), so the new ring kept the style none - the focus ring test in CI caught it. Every new field ring now sets outline-solid with its width. Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
…tial focus on a component stories Signed-off-by: Florian Laabs <florian.laabs@wirecore.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Six gaps found in the DMJ app, one commit each.
outline-nonesets--tw-outline-style: none, andfocus-visible:outline-2took that style – invisible in 22 parts (SidebarNav, Stepper, Menubar …). The redundantoutline-noneis gone; a test over all recipes keeps it so. (outline-hiddenwould not help – it sets the same variable.)data-autofocuson a component root (recipes, vue, react – patch): resolved on opening likedata-autoselect/focusFirst–<Listbox filter data-autofocus>focuses its search field. Story and browser test.label, icon-only segments (patch): only the icon, centred, the label for screen readers. Story Icon only.exportRows="leaves"(vue, react – minor): CSV, Excel and print of a TreeTable without the parent rows; optionrowsof the methods. Story Tree export.useUnsavedChanges(recipes, vue, react – minor): one shared question before leaving unsaved input;unsavedChangesGuardfor the router; text in every language.Tested locally (memory-limited, another process running): focus ring test, dialog autofocus (unit), SegmentedControl (23), DataTable export (12), useUnsavedChanges (4), locales (84), MCP docs, ESLint on the changed files. Typecheck and the full suites run in CI.