Add Lighthouse CI accessibility audit (min score 90)#1022
Open
Joyyyb wants to merge 2 commits into
Open
Conversation
- Add frontend/lighthouserc.js configuring LHCI with a minimum accessibility score of 0.9 (90%) using staticDistDir to serve the built frontend/dist/ directory - Add lighthouse-accessibility job to .github/workflows/ci.yml that installs deps, builds the frontend, then runs @lhci/cli autorun; CI fails if the accessibility score drops below 90
Rust (Test job): - contracts/escrow/src/tests/events.rs: add missing Ledger trait import so set_sequence_number() is in scope - contracts/escrow/src/tests/token_allowlist.rs: remove spurious & borrow in assert_eq! calls (Address returned by value, not by reference) - contracts/escrow/src/lib.rs: add missing is_allowlist_enforced() public method called by token_allowlist tests Check API References: - scripts/check_api_refs.sh: add oracle-service helper names (fetch_game, validate_game_id, platform_name, verify_game_result, fetch_with_backoff, new_with_result, create_client, get_snapshot, as_millis, as_ref, from_millis, is_ok, is_some, ok_or) to EXCLUDE list — these appear in illustrative Rust code blocks in docs, not as contract public functions TypeScript / Lighthouse build (frontend): - WalletConnector.tsx: fix import path ../wallets/types -> ../../wallets/types - matchFilterService.ts: change to import type for MatchSummary, MatchFilters - useMatchFilters.ts: change to import type for MatchSummary, MatchFilters - useBalance.ts: remove unused SorobanRpc and Asset imports - analyticsService.ts: cast through unknown to fix TS2352 on MatchSummary - WalletErrorBoundary.test.tsx: Thrower return type void -> never - WalletConnector.test.tsx: remove unused beforeEach and act imports - albedo.test.ts: cast mock return value through any to satisfy PublicKeyIntentResult type - vite.config.ts: import defineConfig from vitest/config instead of vite to include the test property in the type
Contributor
|
please resolve conflicts |
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.
Closes #907
Issue
There is no automated check to enforce a minimum accessibility score on the frontend, so regressions can be merged without notice.
Acceptance Criteria:
lighthouserc.jsor equivalent config to thefrontend/directoryFiles:
frontend/lighthouserc.js,.github/workflows/Summary
Resolves the missing automated accessibility regression check on the frontend.
Changes
frontend/lighthouserc.js— Lighthouse CI config that:frontend/dist/viastaticDistDirtemporary-public-storagefor review.github/workflows/ci.yml— Newlighthouse-accessibilityjob that:npm ciandnpm run buildin thefrontend/directory@lhci/cli@0.14.x autorunto run the auditAcceptance Criteria
lighthouserc.jsconfig added to thefrontend/directory