[CHORE] Add axe-core WCAG 2.2 AA accessibility tests + DuckDB query tests to CI#420
[CHORE] Add axe-core WCAG 2.2 AA accessibility tests + DuckDB query tests to CI#420John McCall (lowlydba) wants to merge 25 commits into
Conversation
- Add __tests__/a11y.test.mjs: Node built-in test runner + @axe-core/playwright against a minimal static server on the Docusaurus build output - Add .github/workflows/a11y.yml: dedicated Accessibility CI job on every PR - Add test:a11y npm script - Install @axe-core/playwright and playwright as devDependencies Closes #404 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
🗺️ OMF Docs previews are live!
Auto-gen schema site is now available. This is an early preview of a future workflow where we will automatically generate and publish reference docs for the Overture Maps Format schema. The auto-gen schema site may contain incomplete or inaccurate information as we are still refining the generation process, so please compare against the repo schema site and refer to the official Overture documentation for authoritative information. Note ♻️ This preview updates automatically with each push to this PR. |
- home.module.css: darken .featuredIcon from #f97316 (2.8:1) to #c2410c (5.1:1 on white) to pass the 4.5:1 AA contrast threshold - home.module.css: underline inline links in .featuredDesc paragraphs so they're distinguishable without relying on color (WCAG 1.4.1) - docusaurus.config.js: add aria-label to github-link navbar icon so the link has discernible text (WCAG 4.1.2) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
…h-injection) Resolve req.url against BUILD_DIR and reject any path that escapes it before passing it to readFile. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
GitHub recognizes both files in root, .github/, or docs/. No functional change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Replaces the stale root test_queries.py (which only linted and had a broken release-version regex) with a proper execution test. scripts/test_queries.py: - Fetches current release from the STAC catalog (falls back to a hardcoded version on failure) - Walks src/queries/duckdb/*.sql - Single-statement / COPY-wrapper queries: runs as SELECT * FROM (...) LIMIT 1 to validate S3 paths and schema with minimal data transfer - Multi-statement scripts (SET VARIABLE / CREATE TABLE chains): runs in full inside a temp directory so any COPY...TO output is cleaned up - Exits non-zero on any failure .github/workflows/query-tests.yml: - Runs on every PR and on a Monday 06:00 UTC schedule (catches data-side breakage between releases without a code change) Athena/Synapse/Snowflake queries are intentionally excluded — they require credentials that live outside this repo and are already covered by sqlfluff linting in lint.yml. Relates to: OvertureMaps/tf-data-platform#256 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
- ci.yml replaces test.yml and a11y.yml, adding query-tests as a called job. are-we-good rolls up all three into a single required check for branch protection. - query-tests.yml gains workflow_call so ci.yml can reuse it without duplicating steps; schedule and workflow_dispatch kept for standalone data-side monitoring. Branch protection needs just two checks: - are-we-good (from ci.yml) - Super-Linter (from lint.yml) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Adds quickstart (QueryBuilder), guides index, examples index, blog index, and community (CommunityTable) — covers the main distinct templates and custom components in the site. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
- Bump .groupLabel, .cardMeta, .cardRelease from emphasis-500/600 to emphasis-700 (previous values were below 4.5:1 ratio) - Darken .pillTool pill-color from #05A5AF (2.5:1) to #056B73 (5.7:1) on light bg; also passes 6.3:1 for white-on-teal active state - Add .markdown p a / article p a underline rule to fix link-in-text-block across all markdown content (WCAG 1.4.1) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
…y-run - _COPY_WRAP now tolerates leading comment lines, so COPY(...) TO 'file' queries with a stray comment (left after the SET preamble is stripped) unwrap to their inner SELECT instead of being wrapped into invalid 'SELECT * FROM (COPY ...)' SQL. - Retry INSTALL statements: extensions.duckdb.org times out transiently. - Add --dry-run/-n to print every resolved query without connecting or executing — inspecting the wrapped SQL no longer waits on a full run. - Refresh two stale doc queries to the release token + current AWS divisions/division schema (were pinned to dead Azure/2024 releases). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
The divisions guide imported CountsPerEntity and SubTypeCountsUSMXCA but both pointed at divisions_border_usmx.sql and were never rendered, so divisions_counts_per_entity.sql and divisions_subtype_counts_specific_countries.sql sat unused. Repoint the imports at their real files and render them as two tabs in the counts section. Delete three SQL fragments referenced by no docs page: boulder_co_duckdb.sql (also the slowest smoke-test query, a full theme=*/type=* union scan), buildings_madrid.sql, confident_mountains.sql. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
The two added division_area tabs had labels longer than every other tab, overflowing the tab row and clipping the rightmost one. Trim the labels (values unchanged) so all six fit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
…eries Both pointed at the az:// Azure blob endpoint, which fails in CI with an SSL CA cert error (and mismatched the SET s3_region='us-west-2' already in the Detroit query). Switch to the s3:// bucket and add the LOAD httpfs preamble so both run cleanly. Verified live against S3. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
…cripts The one genuine multi-statement script (buildings_in_division_area) ran its buildings COPY in full — an ~86s S3 scan over a county bbox plus ST_INTERSECTS. Inject LIMIT 0 into COPY inner SELECTs in run_multi so the output file is still written (correct schema, zero rows) without scanning, while SET/CREATE steps still execute for real to resolve variables and validate the divisions schema. 86s -> ~16s, still a full end-to-end check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
There was a problem hiding this comment.
Pull request overview
This PR strengthens the docs site’s CI by adding automated WCAG 2.2 AA accessibility checks against the built Docusaurus output and by adding DuckDB “smoke” execution for all published SQL queries against live Overture S3 data, alongside a set of related query and accessibility fixes.
Changes:
- Add Playwright + axe-core accessibility tests and wire them into a consolidated CI workflow.
- Add a Python-based DuckDB query runner and run it in CI (PR + weekly) to detect release/schema drift.
- Apply targeted accessibility-driven styling fixes and update/clean up various DuckDB SQL queries and docs wiring.
Reviewed changes
Copilot reviewed 22 out of 25 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.js | Increases Vitest timeout to reduce CI flakes for render-heavy tests. |
| test_queries.py | Removes the old, root-level query lint script. |
| src/queries/duckdb/seattle_placenames_for_map.sql | Updates query to use S3 + release token and adjusts selected fields/filters. |
| src/queries/duckdb/seattle_buildings_for_map.sql | Switches Azure path to S3 and adds httpfs load/region setup. |
| src/queries/duckdb/divisions_denmark_locality_neighborhood.sql | Replaces hard-coded release with __OVERTURE_RELEASE. |
| src/queries/duckdb/confident_mountains.sql | Removes unused query fragment. |
| src/queries/duckdb/buildings_madrid.sql | Removes unused query fragment. |
| src/queries/duckdb/buildings_detroit.sql | Switches Azure path to S3 and adds httpfs load. |
| src/queries/duckdb/boulder_co_duckdb.sql | Removes unused query fragment. |
| src/css/custom.css | Improves code-token contrast and underlines inline links for WCAG compliance; adjusts blog author email color. |
| src/components/home.module.css | Adjusts icon color and underlines inline links in featured descriptions. |
| src/components/CommunityTable.module.css | Improves contrast for community cards/pills to satisfy AA. |
| scripts/test_queries.py | Adds DuckDB query execution harness (STAC release fetch, LIMIT 0 wrapping, tempdir handling). |
| README.md | Adds WCAG 2.2 AA badge. |
| package.json | Adds test:a11y script and Playwright/axe-core dev dependencies. |
| package-lock.json | Locks newly added Playwright/axe-core dependencies. |
| docusaurus.config.js | Uses a single Prism theme for contrast consistency and adds aria-label to GitHub navbar link. |
| docs/guides/divisions/index.mdx | Fixes raw-loader imports and renders additional division count queries as tabs. |
| blog/2026-03-12-explorer-got-pretty.mdx | Adds iframe title for accessibility. |
| .github/workflows/test.yml | Removes the old standalone unit-test workflow (superseded by consolidated CI). |
| .github/workflows/query-tests.yml | Adds reusable/scheduled workflow to run DuckDB query smoke tests. |
| .github/workflows/ci.yml | Consolidates unit tests, a11y tests, query tests, and adds a rollup job. |
| .github/SECURITY.md | Adds Security Policy file (currently appears to be template content). |
| .github/CODEOWNERS | Adds CODEOWNERS in the supported .github/ location. |
| tests/a11y.test.mjs | Adds Node test runner + Playwright + axe-core tests against built site routes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review feedback: - Guard req.url (can be undefined) before split. - SPA-fallback to index.html only for route-like (extensionless) requests so missing JS/CSS/image assets return 404 instead of masking broken builds. - Guard server.close() in after() so a failing before() hook surfaces its real error instead of crashing on an undefined server. - Keep 'default' on only the first TabItem in the divisions counts block (Docusaurus expects at most one default tab). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: John McCall <john@overturemaps.org>
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Closes #404
Closes OvertureMaps/tf-data-platform#256
What
Accessibility (WCAG 2.2 AA)
__tests__/a11y.test.mjs— axe-core tests via Node's built-in test runner + Playwright against the Docusaurusbuild/output. Covers 7 representative routes:/,/docs/,/getting-data/,/guides/,/examples/,/blog/,/community/.ci.ymlwith anare-we-goodrollup).DuckDB queries
scripts/test_queries.py— fetches the current release from STAC, walkssrc/queries/duckdb/*.sql, executes each query against live S3. Single-statement queries run wrapped asSELECT * FROM (...) LIMIT 0(resolves the S3 glob + binds the schema, so it still catches bad releases and column drift, but skips reading row data — ~27× faster thanLIMIT 1). Multi-statement scripts run in full inside a temp dir.boulder_co_duckdb,buildings_madrid,confident_mountains)..github/workflows/query-tests.ymlruns on every PR and weekly (Monday 06:00 UTC) to catch data-side breakage between releases.Housekeeping
CODEOWNERSandSECURITY.mdmoved to.github/.Visual changes — net effects
All visual edits are accessibility fixes for real axe violations; none change layout, copy, or component structure. Verified against a local build vs. the live
docs.overturemaps.org:link-in-text-block). Link text/targets unchanged.color-contrast). Same colors family, just AA-compliant.aria-label(link-name); blog Explorer iframe gained atitle(frame-title) — both invisible, screen-reader-only.No content was removed or reworded, and no component markup changed beyond these attribute/color tweaks — so reviewers can treat these as low-risk, regression-free.
To extend
PAGESarray in__tests__/a11y.test.mjsfor more a11y coverage.