Skip to content

Compare segmented arrow-key boundaries with plain radios - #113

Merged
pournasserian merged 2 commits into
mainfrom
73-native-radio-boundaries
Nov 28, 2026
Merged

pournasserian merged 2 commits into
mainfrom
73-native-radio-boundaries

Conversation

@pournasserian

Copy link
Copy Markdown
Member

Follow-up to #73 (PR #110). In hosted WebKit, SegmentedTests.TabEntersOnTheChoiceAndTheArrowsSkipDisabledChoices fails in every mode: ArrowDown on the last choice (Year) stays on Year instead of wrapping to Day.

Cause

FlSegmented uses native radios with no keyboard manager, as #73 requires. Whether the arrow keys wrap at the ends of a group is the browser's own behaviour for plain radios. The plain-HTML probe (native-boundary-main.json, unchanged main) shows Chromium and Firefox wrap and WebKit stops. In all three, the disabled radio is skipped, the focused radio is checked and exactly one stays checked. The old test asserted Chromium's wrap as if every browser did it.

Change (test and gallery text only)

  • The test still covers:
    • real Tab entry on the checked choice;
    • ArrowDown selecting Month, skipping the disabled Week, then Year;
    • exactly one checked;
    • the .NET value following in interactive modes;
    • Tab leaving to the next button, in RTL and in all three modes.
  • At each end, it compares with plain HTML radios that it adds to the same document and direction, outside the Blazor root. These have the same values and the same disabled Week. For each end, the reference records where ArrowDown from Year and ArrowUp from Day go; the reference must also skip Week and keep one checked. FlSegmented must then do the same at both ends. Nothing is skipped, made optional or chosen by user agent.
  • The gallery's spec and binding text no longer imply that the arrows always wrap. They say the browser decides at the ends, as it does for any radios.
  • No library, CSS or JavaScript changes. Native links are not involved.

Evidence (local Windows arm64, Playwright Chromium 156.0.8078.4, Firefox 157.0, WebKit 27.2)

  • RED, the old test, $env:FLUENTCMS_BROWSER=<engine>; dotnet test --project tests/FluentCMS.Components.Browser --no-build --filter-method '*TabEntersOnTheChoiceAndTheArrowsSkipDisabledChoices':
    • chromium: exit 0, 3/3;
    • firefox: exit 0, 3/3;
    • webkit: exit 2, 3/3 failed ("Focus should be on … day … and is on … Year").
  • Settled head, after merging main 80c4ad5, --filter-class '*SegmentedTests' --minimum-expected-tests 21:
    • chromium: exit 0, 21/21;
    • firefox: exit 0, 21/21;
    • webkit: exit 0, 21/21.
  • Chromium, --filter-method '*FirstInteractiveFieldsAndInputsMatchThePrerenderTheyReplaced' --filter-method '*GalleryPassesAxe': exit 0, 43/43.
  • dotnet build -warnaserror: 0 warnings, 0 errors. git diff --check is clean.
  • The local WebKit is Playwright's Windows build, not Linux and not Safari. The hosted matrix is still to run.

Refs #73

@pournasserian pournasserian left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator review of d6a0518 on 80c4ad5: inspected both changed files. The test compares the boundary action to a separately constructed plain radio group in the same engine, not to an engine name or to the component itself. It still requires real Tab, ArrowDown past the disabled choice, correct focused/checked item, exactly one selection, and the interactive bound value. The gallery documents native boundary behavior; production code is unchanged. 21/21 focused rows passed in each local Playwright engine. Merge conditional on the four ordinary CI checks on this head; the combined Linux matrix follows with the #74 repair.

@pournasserian
pournasserian merged commit d6c7969 into main Nov 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant