1079 quest screen reader accessibility - #26
Draft
JoeArmani wants to merge 6 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR strengthens Quest’s participant accessibility (VoiceOver/JAWS) by improving focus management, ARIA semantics for validation and grids, and by hardening state/restore behavior so screen-reader announcements and rollback flows remain coherent across navigation, async loads, and host/store failures.
Changes:
- Adds accessible validation semantics (
role="alert",aria-atomic,aria-invalid,aria-describedby) including correct restoration of prior ARIA state for single inputs and checkbox groups. - Improves participant focus + modal lifecycle handling (delayed focus handoff cancellation, modal focus return safety, store-error modal behavior) and makes state rollback resilient to overlapping writes and compound deletions.
- Updates responsive grid markup and conditional encoding (single-encode
displayif, accessible names viaaria-labelledby, non-header corner spacer), with extensive unit/integration/e2e coverage and updated manual test docs/harness scenarios.
Reviewed changes
Copilot reviewed 80 out of 82 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| validate.js | Adds ARIA-linked validation errors and checkbox-group association/cleanup. |
| stateManager.js | Deep-clones state boundaries; improves rollback/overlap handling; preserves tombstones. |
| restoreResponses.js | Normalizes tree tokens; scopes DOM queries to active form; handles deletion tombstones. |
| questionnaire.js | Focus handoff + modal/focus safety; async-load interaction; progressbar ARIA fixes; popover Escape logic. |
| main.js | Cancels pending accessibility work and rebinds state manager early for sequential renders; disposes modals. |
| initSurvey.js | Removes redundant state initialization (moved earlier in render). |
| common.js | Adds/adjusts modal ARIA (aria-describedby, localized close labels), progress bar label, store-error semantics. |
| buildGrid.js | Fixes row condition encoding; improves grid cell labeling and header spacer semantics. |
| eventHandlers.js | Clears validation + modal-accept state on resets; extends modal focus-return safety; includes storeErrorModal. |
| customMathJSImplementation.js | Tightens dateCompare month validation and erroring behavior. |
| Default.css | Adds consistent validation error color; grid corner spacer styling. |
| Style1.css | Improves hover contrast; sets validation error color. |
| ActiveLogic.css | Adds grid corner spacer styling in responsive layout. |
| i18n/en.js | Adds progress bar accessible label string. |
| i18n/es.js | Adds progress bar accessible label string (Spanish). |
| quest.js | Adds LF fallback removeItem; makes global LocalForage clear non-blocking. |
| docs/accessibilityManualTest.md | Expands manual a11y URL scenarios and explicit VoiceOver/JAWS checks. |
| tests/setup/jsdom.js | Stubs RAF/CAF; improves Popover stub semantics; ensures cleanup cancels focus handoff. |
| tests/unit/stateManager.spec.js | Updates/remodels expectations for mappings/tombstones; adds new rollback/compound cases. |
| tests/unit/customMath.spec.js | Adds dateCompare coercion + invalid month coverage; clarifies test descriptions. |
| tests/unit/buildGrid.spec.js | Verifies corner spacer + scope="col" headers; validates aria-labelledby and displayif encoding. |
| tests/integration/validation.spec.js | Adds integration coverage for ARIA error semantics and checkbox-group associations. |
| tests/integration/restoreResponses.spec.js | Adds coverage for raw tree token restoration and tombstone-safe restore. |
| tests/integration/questionnaireHelpers.spec.js | Adds modal acceptance semantics + focus return; ensures XOR clears validation state. |
| tests/integration/eventHandlers.spec.js | Adds compound deletion persistence + reset validation clearing + focus handoff cancellation cases. |
| tests/integration/gridDeepCoverage.spec.js | Adds conditional grid storage + displayif encoding coverage; modal description checks. |
| tests/integration/hostFailures.spec.js | Stabilizes store-error modal assertion timing. |
| tests/integration/markupFidelity.spec.js | Renames fixture vars; updates popup content expectations. |
| tests/integration/productionLoopCoverage.spec.js | Minor wording update in loop test names. |
| tests/integration/accessibilityBuilder.spec.js | Adds compound/conditional radiogroup semantics + announcement cancellation coverage. |
| tests/integration/accessibilityBehavior.spec.js | Expands modal-close focus restoration coverage (incl. storeErrorModal) and cancellation cases. |
| tests/integration/covidDurationNavigation.spec.js | New: characterizes locked COVID navigation with malformed vs corrected conditions. |
| tests/knownDefects/runtime.spec.js | Refactors known-defect characterizations to use locked corpus readers and new scenarios. |
| tests/knownDefects/registry.js | Updates defect registry set (adds/removes/rewrites entries) and consolidates known defects. |
| tests/harness/participantScenarios.js | New: centralized manual harness scenario configs (store failure, async success/error). |
| tests/harness/participant.js | Adds scenario/lang query support with validation; uses MANUAL_SCENARIOS config. |
| tests/fixtures/canonical/responseConfirmation.txt | New: English response-confirmation fixture for manual/e2e checks. |
| tests/fixtures/canonical/responseConfirmationSpanish.txt | New: Spanish response-confirmation fixture for manual/e2e checks. |
| tests/fixtures/canonical/gridResponsiveSpanish.txt | New: Spanish grid fixture for accessible naming checks. |
| tests/fixtures/canonical/compoundRadioGroups.txt | New: compound radio subgroup fixture (English). |
| tests/fixtures/canonical/compoundRadioGroupsSpanish.txt | New: compound radio subgroup fixture (Spanish). |
| tests/fixtures/canonical/conditionalCompoundRadioGroups.txt | New: conditional compound radiogroup fixture (English). |
| tests/fixtures/canonical/conditionalCompoundRadioGroupsSpanish.txt | New: conditional compound radiogroup fixture (Spanish). |
| tests/fixtures/canonical/allConstructs.txt | Updates wording to match new naming/confirmation semantics. |
| tests/e2e/responsive.spec.js | Asserts spacer semantics and accessible grid choice names; removes harness waits. |
| tests/e2e/visual.spec.js | Adds screenshots/metrics for compound/conditional radiogroup layout stability. |
| tests/e2e/participantControls.spec.js | Adds validation ARIA assertions for bounded inputs; removes harness waits. |
| tests/e2e/participantNavigationState.spec.js | Adds exact retry contract after store failures + accessible dialog expectations. |
| tests/e2e/participantAsync.spec.js | Reuses shared async scenario fixtures from participantScenarios. |
| tests/e2e/popoverAccessibility.spec.js | Removes harness waits; adds “Escape when closed” coverage. |
| tests/e2e/keyboardNavigation.spec.js | Adds standalone textarea Reset contract; removes harness waits; adds accessible name asserts. |
| tests/e2e/gridDeepCoverage.spec.js | Adds conditional-grid e2e coverage + accessible name assertions; renames project set. |
| tests/e2e/constructs.spec.js | Ensures scalar controls retain accessible captions; special-cases time label semantics. |
| tests/e2e/module4AddressPaths.spec.js | Adds accessible-name matrix for address fields; removes focus wait helper. |
| tests/e2e/productionMarkupFidelity.spec.js | Adds conditional scalar semantics e2e matrix; adds harness utilities usage. |
| tests/e2e/productionPiping.spec.js | Minor wording update (“source” vs “authored”). |
| tests/e2e/productionFanoutXor.spec.js | Minor wording update (“source order”). |
| tests/e2e/backDeletion.spec.js | Moves raw-token restore from known-defect to required behavior. |
| tests/e2e/manualAccessibilityUrls.spec.js | New: smoke coverage for documented manual harness URLs and query validation. |
| tests/e2e/support/authoring.js | Adds more detailed LF fallback script modes and routing behavior. |
| tests/e2e/authoring.spec.js | Moves authoring LF fallback clear regression coverage into main authoring suite; adds validation contrast check. |
| tests/e2e/accessibilityLifecycleKnownDefects.spec.js | Removes stale selection defect tests; refocuses on image-alt “decision” semantics. |
| tests/e2e/knownDefects.spec.js | Removed: superseded by new targeted a11y/runtime coverage and defect registry changes. |
| tests/e2e/authoringKnownDefects.spec.js | Removed: replaced by non-known-defect regression test in authoring.spec.js. |
| tests/corpus/README.md | Updates terminology (markerCount) and clarifies catalog semantics. |
| tests/corpus/structuralCatalog.spec.js | Renames counts field; adds scalar accessible-name/lint checks for corpus renders. |
| tests/corpus/scripts/verifyCorpus.mjs | Updates output wording (“question markers”). |
| tests/corpus/scripts/lib/structuralCatalog.mjs | Bumps schema version; renames authoredMarkerCount → markerCount. |
| tests/corpus/responsePipingStructure.spec.js | Terminology updates (“source pairs”). |
| tests/corpus/productionMarkupEdgeCases.spec.js | Adds locked-production scalar accessible-name assertions; wording tweaks. |
| tests/corpus/module4ConditionalCompoundStructure.spec.js | New: validates Module 4 conditional compound radiogroup structure end-to-end. |
| tests/corpus/module4AddressStructure.spec.js | Variable rename for clarity (“sourceContent”). |
| tests/corpus/corpusIntegrity.spec.js | Terminology update (“strips comments”). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+78
to
+82
| if (handled) return; | ||
|
|
||
| if (typeof resObject === "string") { | ||
| const element = document.getElementById(resKey); | ||
| const element = formElement.querySelector(`#${CSS.escape(resKey)}`); | ||
| if (!element) return; |
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.
Related: episphere/connect#1079
Additional tests + VoiceOver and JAWS support.