Repository navigation
test(text-field): add gen2 a11y spec and dedicated VRT stories - #6797
miwha-adobe wants to merge 6 commits into
Conversation
|
📚 Branch Preview Links🔍 Gen1 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
eda42b4 to
ce93d8a
Compare
nikkimk
left a comment
There was a problem hiding this comment.
I have some open questions about snapshots, but also I'm wondering if I should have included some a11y tests for the mixins.
23b345c to
3b44708
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
3b44708 to
33e4ab2
Compare
Improve failure output for Storybook play-function assertions.
- Keep required-state verification on the input; Playwright rejects it in snapshots. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
rise-erpelding
left a comment
There was a problem hiding this comment.
This is looking good! Noticed a few things on the custom properties VRT where custom properties aren't having an effect but permutations are looking great!
Description
Test-only PR — no production code changes. Adds three test files that close out Phase 6 — Testing in the text-field migration plan:
test/text-field.a11y.spec.ts— Playwright ARIA snapshots for thetextboxrole, accessible name, and description across every labelling source, size, position, necessity indicator, prefix, and state; plus three keyboard checks against thedelegatesFocus: truecontract.test/vrt/text-field.vrt.ts— onePermutationsVRT story crossing sizes × label positions × necessity × states × anatomy × prefix × forced pseudo-states × wrapping × CJK, inlight/ltr+dark/rtl, plus aForcedColorsvariant. Includes a custom:host(:state(keyboard-focused))mirror because the sharedforcePseudoStateshelper can't reach element-internals state.test/vrt/text-field-custom-properties.vrt.ts— aCustomPropertiesVRT story that renders every documented--swc-*property and callsverifyCustomPropertyCoverageagainst the CEM, so any new property fails the story until it's covered.Related issue(s)
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Playwright a11y spec runs green
yarn build:gen2 && yarn workspace @adobe/spectrum-wc storybook:buildyarn workspace @adobe/spectrum-wc test:a11y --grep "Text field"VRT permutations render as expected
light/ltranddark/rtl.CEM coverage rejects gaps
--swc-text-field-*@csspropertyto the CEM.verifyCustomPropertyCoverageto throw. Revert.Device review
Accessibility testing checklist
Keyboard (required — document steps below)
shadowRoot.activeElement === input(delegatesFocus).valueto reflect the input.DisabledandDisabled + invalid, and to visitRead-only.Screen reader (required — document steps below)
accessible-label, andaccessible-labelledbyvariants.aria-describedby(noaria-errormessage— see the a11y migration analysis).labelmode to include "(required)" or "(optional)" in the name;iconmode announces only the label.