Repository navigation
Accessibility Audit 1.1.0: the dry submit tests forms with no data sent - #1
Merged
Merged
Conversation
The engine clicks the submit button of each form on the sample pages, first empty, then with an incorrect value in each text field, and tests the errors that the page shows: 3.3.1, 3.3.3, and a new 4.1.3 rule for errors that a screen reader does not announce. A guard in the browser blocks each request that can carry the data, so the dry submit is safe on production. - FORMS.md: the plan for the form tests (dry submit, real submit on staging, test account for the sign-in). - src/own/dry-submit.ts: the form finder, the guard, and the submission test. - tests/dry-submit.mjs: eleven ways to send a form, a control run with no guard, and the seeded faults F59 and F61 with production settings. In npm test. - The setting interaction.dry_submit (default true) and coverage.forms_tested. - The form tests accept "Enter ..." as the suggestion for an empty field.
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
Until now, the engine did not type or submit on production, so the form error tests (3.3.1, 3.3.3) ran only in a process on staging. This change adds the dry submit: the engine submits each form on the sample pages and tests the errors that the page shows, while a guard in the browser keeps the data from leaving.
The plan is in
FORMS.md. It has three parts: the dry submit (built here), real submits on staging (a checklist for each site), and a test account for the sign-in.What the dry submit does
a11y-dry-submit. B runs only when A showed errors. Each submission has its own render.error-not-in-text,error-not-linked(3.3.1),error-without-suggestion(3.3.3), the newerror-not-announced(4.1.3), then the state tests on the error state.The guard
After the guard starts, the browser blocks:
.jspathService workers are blocked, and a WebSocket cannot send.
Proof
tests/dry-submit.mjs(now innpm test) uses 11 ways to send a form: fetch POST, POST form, GET form, fetch GET, JSONP to the site and to another host, beacon, new window, frame, pixel, and WebSocket.npm testpasses. The full seeded detection finds 74 of 74, with no new side findings.Other changes
interaction.dry_submit(defaulttrue) andcoverage.forms_testedin the summary.PLAN.md,README.md,SKILL.md).Not in this PR
Part 2 (a safe staging for each site) and part 3 (test accounts) are setup tasks on the sites, listed in
FORMS.md.