test(layoutConstants): add accessibility tests (#4639)#4872
Open
soumyasekharshee265-ux wants to merge 1 commit into
Open
test(layoutConstants): add accessibility tests (#4639)#4872soumyasekharshee265-ux wants to merge 1 commit into
soumyasekharshee265-ux wants to merge 1 commit into
Conversation
|
🚨 Hey @soumyasekharshee265-ux, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
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.
Description
Fixes #4639
This PR adds a new test file
lib/svg/layoutConstants.accessibility.test.tsthat verifies Accessibility Standards & Screen Reader ARIA Compliance for the SVG layout constants module (lib/svg/layoutConstants.ts).Since
layoutConstants.tsexports numeric constants (heights, scale multipliers, tile dimensions, grid origin) — not DOM elements — the accessibility tests focus on the applicable concerns for layout values that drive visible SVG geometry:<200px) so content never clips off-canvas and out of assistive-tech reachLOG_SCALE_MULTIPLIER > LINEAR_SCALE_MULTIPLIER), so low-activity users still see meaningful tower shapes0 < X < 600,0 < Y < 420) so the rendered city stays in the visible focus orderTILE_WIDTH_HALF > TILE_HEIGHT_HALF) so tower geometry stays parseable for the<title>accessibility tags required by CONTRIBUTING.mdTest results: 5/5 tests pass in
npx vitest run lib/svg/layoutConstants.accessibility.test.ts(8ms duration).Pillar
Visual Preview
No visual changes — this PR only adds a new test file. No source code, themes, or SVG output is modified.
Test run output:
Checklist before requesting a review:
CONTRIBUTING.mdfile.npx vitest run lib/svg/layoutConstants.accessibility.test.ts— all 5 tests pass).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter. (N/A — no new theme or URL parameter added)