Add date-picker-calendar test case (interaction-level selection-grid ARIA) - #20
Open
manichandra wants to merge 1 commit into
Open
Add date-picker-calendar test case (interaction-level selection-grid ARIA)#20manichandra wants to merge 1 commit into
manichandra wants to merge 1 commit into
Conversation
Covers a date-picker calendar widget and the interaction-level ARIA contract for selection grids that a static axe-core pass does not catch: aria-selected vs aria-pressed on day cells, grid/listbox role semantics, single programmatic selection, and arrow-key focus movement (WAI-ARIA 1.2 / APG grid pattern; WCAG 2.1 SC 4.1.2).
Includes prompt.yaml, test.js (six Requirement assertions following the module.exports.run = async ({ page, assert, utils }) convention), and two examples with embedded a11y-assertions expectations (a conformant grid and an aria-pressed anti-pattern). Verified with node_runner: the conformant example passes all six; the anti-pattern fails the four selection/keyboard assertions.
Author
|
@microsoft-github-policy-service agree |
3 tasks
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
Adds a new test case,
test_cases/date-picker-calendar/, that evaluates a date-pickercalendar widget. It focuses on the interaction-level ARIA contract for selection grids
— semantics that a static axe-core pass does not catch on its own.
Motivation
The existing test cases cover forms and disclosure patterns, but there is no calendar /
date-picker case. Date grids are a common pattern models frequently get subtly wrong in
ways axe-core alone does not flag:
aria-pressedvsaria-selected. Generated calendars often mark the chosen day witharia-pressed(toggle-button state) instead ofaria-selected(selection state). Bothattributes are individually valid, so axe-core does not report it — but a screen reader
announces "button pressed" instead of "selected". A role-contract defect only a semantics
assertion catches.
role="gridcell"/role="grid", so AT cannot present them as selectable days.These map to WAI-ARIA 1.2, the WAI-ARIA APG grid pattern, and WCAG 2.1 SC 4.1.2.
What this adds
prompt.yaml— a neutral product spec (does not state the ARIA answer).test.js— six assertions, following the existingmodule.exports.run = async ({ page, assert, utils })convention:aria-selected, notaria-pressedDOM discovery is self-contained; the only
utilscall (reload) is guarded.Validation
Ran
test.jswith Playwright against a conformant calendar (all six pass) and ananti-pattern calendar using
aria-pressedtoggle buttons with no grid semantics orkeyboard nav (assertions 3–6 fail with specific messages).
Checklist
test_cases/conventions