Repository navigation
feat(a11y): one focus outline, and forms that start in their first field - #510
Merged
Merged
Conversation
Keyboard focus drew three styles: Button's ring with an offset, every other atom's ring without one, the geocoder's box-shadow, and Mapbox's blue halo on its credits button even for a mouse click. A `focus-ring` utility replaces all of them: a 2px inset outline in the focus colour with a 2px band of the panel's colour inside it, so it survives an overflow clip and shows on a filled control of its own hue. `focus-ring.test.ts` refuses a control's own ring. `touch-target` now asks `useCoarsePointer`'s question, `(hover: none) and (pointer: coarse)`, so a touchscreen laptop's mouse meets no invisible area. The geocoder's 20px clear button gains the same 44px area through its sheet. The Modal atom starts a dialog holding a field in that field rather than on its ×; on a touch-only screen the dialog itself takes focus, so no keyboard rises unasked. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#501's choice card rings itself with `has-[:focus-visible]:ring-2 ring-focus` while its radio is hidden behind the icon: a third style, and on the checked card in dark mode a ring in the fill's own colour. It takes `focus-ring-within`, the same drawing as `focus-ring` on a box whose focus lands on a hidden control inside it. The drawing itself is `focus-outline`, which the Mapbox rules also apply now, since their selectors already name the state. The drift spec reads a ring behind any focus state, `has-[…]` included. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first pass ran Prettier over the whole of src/components/AGENTS.md and scripts/check-a11y.mjs, re-padding tables and requoting strings no change here touched. Both now carry only the touch-target query and the focus-outline note. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- One `TOUCH_ONLY_QUERY` in `config/responsive.ts`, read by `useCoarsePointer` and the Modal, and pinned against `touch-target` by the spec rather than a second literal. - `focus-outline` is Tailwind's own outline and inset-ring utilities, not a hand-copied `--tw-*` shadow stack. The choice card takes it behind `has-[:focus-visible]:`, so the one-call-site `focus-ring-within` goes. Of the Mapbox resets only the credits button's halo needed one. - The geocoder's clear button takes `touch-target` and `focus-ring` from `MapSearch`'s wrapper: search-js-web nests no shadow root, so the copied `::after` and outline in its sheet go. - The Modal focuses the dialog, then the first field once one exists, so the report form behind its spinner starts in its first field too; a dialog with no field no longer opens on its ×. The swallowed `<select>` and hidden fields leave the selector. - The carousel's touch spacing follows the tap areas it makes room for. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
- The Modal's field selector and finder fold into their one caller. - The component guide points at `TOUCH_ONLY_QUERY` and the focus spec instead of restating the query, the outline's mechanism and the spec's rule. - `focus-ring.test.ts` pins the geocoder field's hand-copied outline against `focus-outline`, which its sheet cannot apply. - MapSearch's wrapper reaches the clear × by its seeded `--ClearBtn` suffix, not every `<button>` under it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 002fe37 | Nov 26 2026, 08:46 PM |
# Conflicts: # CHANGELOG.md # src/components/molecules/ActionRow/ActionRow.tsx
10 tasks
Ardnived
added a commit
that referenced
this pull request
Nov 26, 2026
…t stop The walk presses Tab once per tabbable element, but a roving-tabindex group (#501's weekday picker) is one Tab stop holding seven, so on molecules--form-field the walk outlasted the page, wrapped to ff-name and reported it as a backwards jump. main has failed the gate since #501 and #510 landed together. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ardnived
added a commit
that referenced
this pull request
Nov 26, 2026
…isitor's own format (#509) * feat(dates): every date and time through one Intl formatter, in the visitor's own format Dates and times now go through src/lib/time.ts in regionalLocale(locale): the browser's first language decides, so an en-GB browser reads "17:45–18:45" and "Wed 18 Nov", en-US "5:45 – 6:45 PM" and "Wed, Nov 18", and a browser whose first language is another keeps that language's clock on the English page (cs-CZ "17:45", a Brazilian browser on en-BR-u-hc-h23). - Times use timeStyle 'short', so whole hours keep their minutes. - A range that wraps past midnight and runs 12 hours or more writes both day periods ("5:00 PM – 12:00 PM", not "5:00 – 12:00 PM"). - A year joins a date only when it is not this year. - Callers: useEventDisplay, the filter time labels, ActiveFilterPills, SearchFilters (weekdayNames instead of luxon's Info.weekdays), the registration dates, and the calendar header; the Schedule-X grid runs regional English as en-GB or en-US by date order (scheduleXLocale). - Distances follow the same locale: miles for a UK or US region. - src/AGENTS.md gains the "Dates and times" rule. Main's #380 clock rule is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor: simplify per /simplify pass - useLocale() returns formatLocale, so callers stop deriving regionalLocale themselves, and formatTimePeriods takes it like its siblings. The specs' useLocale mocks pin it, so they no longer read the machine's own locale (use-event-display.test.ts failed on an en-GB machine). - formatTimeRange: the wrap-past-midnight join fires only when formatRange actually collapsed a day period, reading the separator off the same parts; a 24-hour locale keeps its own range and suffix ("17:00–12:00 Uhr"). - wallClock replaces events.ts's hourClock; formatDate drops its test-only `now` for luxon's Settings.now; usesMiles and dayFirst lose catches that guarded nothing; scheduleXLocale loses an unreachable row. - Shorter comments and src/AGENTS.md rule; duplicate tests removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(dates): a Portuguese browser keeps the calendar grid in Portuguese The regional locale hands Schedule-X the browser's own Portuguese tag (pt-PT, pt), which matched no entry and fell back to en-US. Key the table by language so every Portuguese tag runs pt-BR, as main did. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(dates): state the rule in the spec comments, not who asked for it Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(dates): a webview with no navigator.languages formats in the page's locale Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(i18n): formatLocale formats, and is never a locale the widget fetches Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): link the date-format entry to #509 Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(calendar): Schedule-X's locale lives with the calendar shaping, not the formatters scheduleXLocale is calendar configuration with one caller, so it moves from lib/time.ts into lib/shape/calendar.ts beside the other Schedule-X helpers. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(dates): the dates rule names the module, not its exports Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(a11y-gate): end the keyboard walk when Tab wraps back to the first stop The walk presses Tab once per tabbable element, but a roving-tabindex group (#501's weekday picker) is one Tab stop holding seven, so on molecules--form-field the walk outlasted the page, wrapped to ff-name and reported it as a backwards jump. main has failed the gate since #501 and #510 landed together. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(a11y-gate): index the last stop so the walk typechecks Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(a11y-gate): an unstamped keyboard stop is not a jump to the top A stop the page rendered after the audit carries no data-a11y-order, and Number(null) is 0, so views--event-·-sticky-register failed tab-order at random whenever the audit read the story before it finished rendering. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Contributor
|
The session for review-pr did not finish after 3 attempts. I have stopped retrying. A 🤖 sydevs dispatcher |
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.
Summary
Change outline
Contract — keyboard focus and tap areas (
docs/embedding.md§ Accessibility)What a host's visitor sees changes, but there is no new parameter, origin, CSP or Permissions-Policy entry.
Files — one outline, drawn from
globals.cssThe per-atom
focus-visible:ring-2 ring-focus(three styles) gives way to two utilities.Behaviour —
startInFirstField(src/components/atoms/Modal/Modal.tsx,onOpenAutoFocus)Radix's default focused the header's ×.
Preview
/search?format=online(press Tab through it, and type in the search box to see the clear ×), and in the component library's Modal ("With a form"), Button and Inputs → Radio Group stories.Contract impact
docs/embedding.mdandCHANGELOG.mdchange in this PR. The two in-tree hosts, WeMeditateWeb'slib/atlas-embed.tsand the WordPress plugin's templates, set none of this, so neither needs a change.Test results
src/styles/focus-ring.test.ts(utility query pinned toTOUCH_ONLY_QUERY, the outline's drawing and the geocoder's copy of it, and no ring in the focus colour anywhere insrc/) andModal.focus.test.tsx(first field, late field, touch-only). Each failed against the defect it covers before passing.pnpm build✓.pnpm test:a11ygave 3 findings, and main gives the identical 3 locally: the Mapbox logo's tap area, and tab order in the two registration stories.Manual verification
/search. The map, Mapbox's logo and credits, find-me, settings, the search box, Filters, Sort, the tags and the cards should all show the same outline. A mouse click should show none.Notes for reviewer
pointer-coarse:sizes (44px Buttons, fields, toggle items) still ask(pointer: coarse)alone. A touchscreen laptop therefore gets the larger drawn controls but no invisible tap areas. Redefining the variant with@custom-variantwould unify the two but shrink about 25 drawn sizes on such laptops, so it is left as a follow-up..ClearBtn { position: relative }would unpin the button: it is statically positioned inside the library's absolute.ActionIcon. Measured: drawn 20×20 at the same spot, with a 45×45 hit area on touch.Detail
-outline-offset-2), so anoverflowclip cannot cut it. A 4px inset ring of the panel colour shows as a 2px band inside the line. The line alone measured 1:1 on the checked choice card and on Register in dark mode, and the band is what keeps them visible (checked in the browser in both themes).@mapbox/[email protected]nests no shadow root, so its clear button can take utilities fromMapSearch's wrapper. Only the field's own box,.Geocoder, whose class name is seeded per instance, keeps a rule in the library's themecssText.textarea#report-field-0. On a touch-only screen it stays on the dialog.🤖 Generated with Claude Code