Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changeset/accessibility-statement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

No release. The repo has an accessibility statement, `ACCESSIBILITY.md`, and an issue form for reporting a barrier on the docs site.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/accessibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Accessibility barrier
description: Something on the documentation site stops you from doing what you came to do, or makes it harder.
labels: ["accessibility"]
body:
- type: markdown
attributes:
value: |
You do not need to tell us about a disability, or send a screenshot or a recording.
This issue is public, so leave out anything you want to keep private.
- type: input
id: page
attributes:
label: Page
description: The address of the page, or its name.
placeholder: "https://northguild.dev/gmt/tools/dst-inspector/"
validations:
required: true
- type: input
id: task
attributes:
label: Task
description: What you were trying to do.
placeholder: "Choose a time zone from the list"
validations:
required: true
- type: textarea
id: happened
attributes:
label: What happened
description: What got in the way.
placeholder: "I could not reach the list with the keyboard."
validations:
required: true
- type: input
id: browser
attributes:
label: Browser
description: Optional. The browser, with its version if you know it.
- type: input
id: system
attributes:
label: Operating system
description: Optional. Such as Windows, macOS, iOS, Android or Linux.
- type: input
id: assistive
attributes:
label: Assistive technology
description: Optional. Any software, device or browser setting you use, such as a screen reader, screen magnifier, voice control or larger text.
109 changes: 109 additions & 0 deletions ACCESSIBILITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Accessibility

We want everyone to be able to use the GMT documentation site, including people who use a
keyboard, a screen reader, magnification or their own colours. If something gets in your way,
[report a barrier](https://github.com/northguild/gmt/issues/new?template=accessibility.yml).

## Scope

This statement covers the documentation site at <https://northguild.dev/gmt/>, with its guides,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This covers https://northguild.dev/gmt/, but nothing on that site links to the statement or the form. I searched for ACCESSIBILITY.md and template=accessibility outside this file and found only tests, tier-2-gates.md and the changeset. The site's social links in apps/dox/astro.config.mjs (lines 176–187) are GitHub and Discord. So a reader who hits a barrier on the site has to know to look in the repository.

#592 asked only for the file in the repository, so this is a suggestion for here or a follow-up issue: a footer link from the site to the statement would let that reader find it.

tools, slides and chat.

The npm packages in `packages/` return plain values such as strings and draw no interface. The app
that shows those values decides how accessible they are.

## Target

We aim for the Web Content Accessibility Guidelines (WCAG) 2.2, level AA, across the site. This is
a target. We do not claim that the site conforms.

## What we test

- **Pages.** An automated check, `a11y-axe`, runs axe-core's WCAG level A and AA rules. Every week
it checks every page in Chromium, in the dark and light themes, at a desktop and a phone width.
It also checks a sample of pages in Firefox and WebKit. A finding that shows again on a second
run is filed in an issue.
- **Changes.** On a pull request that changes the site, the same check runs in Chromium on the
pages the change affects, or on a sample of them. It reports problems and does not block the
merge.
- **Components.** The tests of our shared components run axe-core too, and press the keys of the
shared controls. They skip colour contrast and target size, which need a real page.
- **The data-credits button.** A check opens and closes it from the keyboard, in Chromium, Firefox
and WebKit.
- **Code and styles.** Lint rules check the React code for common accessibility mistakes, and the
stylesheets for hidden focus outlines and unreadably small text.
- **Contrast.** The colours for body text, links and code, and the globe's labels, are designed
for a contrast of 7:1. Unit tests hold them there on the backgrounds they are designed for. This
does not cover every piece of text.

The site is designed for four preferences: reduced motion, reduced transparency, more contrast and
forced colours. Browser tests turn on reduced motion for one tool and forced colours for the
clock-change maps. Unit tests cover some of the preferences in some scripts. No test covers all
four across the site.

Automated checks find only some barriers. They cannot tell whether a page makes sense.

## Supported environments

Our automated page checks run in Chromium, Firefox and WebKit, the engines that Chrome and Edge,
Firefox, and Safari are built on. Our target includes using the site with the keyboard alone.

In Safari on macOS, Tab skips buttons unless you turn on "Press Tab to highlight each item on a
webpage" in Safari's settings. Option+Tab moves to them without that setting.

## Known limitations

We know of no barrier on the site. When one is confirmed, we describe here what it stops a reader
from doing and link to its issue, until it is fixed. See the
[open accessibility issues](https://github.com/northguild/gmt/issues?q=is%3Aissue%20state%3Aopen%20label%3Aaccessibility).

We have not tested:

- the whole site by hand, with the keyboard alone or in the released versions of Chrome, Safari and
Firefox;
- any screen reader;
- voice control, switch access or screen magnification;
- the four preferences above, by hand, on every page;
- most states that appear only after you act, such as an open menu, a tool's result or a chat
answer, on the built pages;
- the WCAG criteria that axe-core cannot check, such as whether focus is hidden behind other
content, whether dragging has an alternative, or whether help is in a consistent place.

## Changing the site

The maintainers change the site; pull requests from others are accepted only for the packages
([CONTRIBUTING.md](./CONTRIBUTING.md#contributions)). These rules apply to people and to coding
agents alike:

- `pnpm run validate` passes. It runs the lint rules and the component tests that the change needs.
- The `a11y-axe` findings that the pull request's "Dox gates" check reports are fixed.
- A new shared component has a test that runs axe-core and presses its keys.
- An `a11y-axe` finding is waived in one place only,
[`a11y-axe-exclusions.json`](./apps/dox/scripts/a11y-axe-exclusions.json). An entry names the
rule, the element and the pages, and gives measured evidence that the finding is false. A real
barrier is fixed, never excluded.

## Report a barrier

[Open the accessibility form](https://github.com/northguild/gmt/issues/new?template=accessibility.yml).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every route in this file needs a GitHub account: the form here at line 88, the same link at line 5, and issues/new/choose at line 109. People who meet a barrier on the docs site are also the people most likely to find signing up for GitHub, and using its UI, hard, and the statement does not say an account is needed.

Could the section say a GitHub account is needed for the form, and give one route that works without one? An email address is the usual one. .github/ISSUE_TEMPLATE/config.yml already offers Discord, but that needs an account too, so it does not fill the gap on its own.

It adds the `accessibility` label. Tell us the page, what you were trying to do and what happened.
The browser, the operating system and any assistive technology help us, if you want to share them.

You never need to tell us about a disability, or send a screenshot or a recording. Issues are
public, so leave out anything you want to keep private.

## What happens next

1. We reply in the issue to say we have read it.
2. We try to reproduce the barrier, and ask in the issue when we need more.
3. We say what we will do, or why we cannot fix it.
4. When a fix is on the site, we say so in the issue. You can check it. If the barrier is still
there, tell us and we reopen the issue.

We do not promise a date for a reply or a fix.

## Who keeps this current

The NorthGuild maintainers own this statement. They update it in the same pull request as any
change to what we test or support. To suggest a change to it,
[open an issue](https://github.com/northguild/gmt/issues/new/choose).
5 changes: 5 additions & 0 deletions apps/dox/scripts/affected.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const allBut = (...skip: string[]) =>

describe("affected: which checks a change runs", () => {
it.each([
{
name: "the root policy documents run nothing",
changes: ["ACCESSIBILITY.md", "SECURITY.md"],
checks: [],
},
{
name: "notes in context/ run nothing",
changes: ["context/dox/built/index.md", "context/skills.md"],
Expand Down
1 change: 1 addition & 0 deletions apps/dox/scripts/pr-meta/plan.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ describe("planMeta labels", () => {
[".github/PULL_REQUEST_TEMPLATE.md", "gmt monorepo"],
[".changeset/config.json", "gmt monorepo"],
["docs/dst-disambiguation.md", "documentation"],
["ACCESSIBILITY.md", "documentation"],
["LICENSE", "documentation"],
["apps/LICENSE", "documentation"],
])("labels %s alone %s", (path, label) => {
Expand Down
2 changes: 1 addition & 1 deletion context/dox/built/tier-2-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Dox has three gates: `a11y-axe`, `rendered-links` and `data-credits-check`. They
- The page contract: each gate script answers `--list-pages` (a JSON array of site paths, no browser launched), `--pages <a,b>` (an unknown path is a usage error, exit 2) and `--base`, through `applyPageContract` in `scripts/gates/contract.mjs`. Each finding goes through `recordFinding` (`scripts/gates/findings.mjs`) to the file named by `GATE_REPORT`; `recordMeasured` counts what a run measured, and a run that measured nothing fails.
- `rendered-links` (`scripts/rendered-links.mjs`, Chromium, one theme) opens every built page with a `data-widget` element (`listWidgetPages` in `scripts/lib/widget-pages.mjs`, a use of the `listBuiltPages` walker in `scripts/lib/built-pages.mjs`, read from `dist`, never a fixed list) at 1440 x 900, waits for a widget root and `settle`, then reads the `href` attribute of every `a[href]` and `area[href]` as written. A relative value is resolved against the page with `resolveHref`, and `isPageLinkWithoutSlash` (`scripts/lib/page-links.mjs`, the predicate `test:dist` uses) judges it. Rule `page-link-without-slash` names the page, the value and the widget that holds the link; rule `check-crashed` is a page that would not load. Links that appear only after a click are left to each tool's own tests. Takes `--base`, `--browsers`, `--pages`, `--list-pages` and `--shard <i>/<n>`.
- `data-credits-check` (`scripts/data-credits-check.mjs`, three engines) checks the data-credits info button on `/`, `/tools/zoned-earth/`, `/why-gmt/` and the Canada and Morocco clock-change pages, at 1280 x 800 and 375 x 812 and at scroll top, middle and bottom: the button overlaps no focusable element or text, Tab (Option+Tab in WebKit) reaches it, Enter opens the popover, the accessibility tree shows it expanded, Escape closes it and returns focus, and the open panel sits in the viewport and covers no control. A globe stack is entered by ArrowUp from Zoom in, which wraps to the info button, and one Tab from Zoom in leaves the toolbar. The browser zone is pinned so Locate shows. It waits for the panel's animations to finish, never a fixed delay, before it reads the panel's opacity. On `/` it also reads the "Coming up in the sky" list at two pinned instants.
- `a11y-axe` (`scripts/a11y-axe.mjs`, three engines, both themes, 1440 and 390 px) runs axe-core on every built page (`distPages` in `scripts/lib/a11y-sweep.mjs`) and fails any violation. `scripts/a11y-axe-exclusions.json` is the only place a rule or selector may be waived: an entry covers a result only when rule, selector and page all match, and its `reason` gives measured evidence of a false positive. A real violation is fixed, never excluded. A change to the file runs the gate on the sample (`inputIndex()` in the registry).
- `a11y-axe` (`scripts/a11y-axe.mjs`, three engines, both themes, 1440 and 390 px) runs axe-core on every built page (`distPages` in `scripts/lib/a11y-sweep.mjs`) and fails any violation. `scripts/a11y-axe-exclusions.json` is the only place a rule or selector may be waived: an entry covers a result only when rule, selector and page all match, and its `reason` gives measured evidence of a false positive. A real violation is fixed, never excluded. A change to the file runs the gate on the sample (`inputIndex()` in the registry). A change to what a gate covers updates `ACCESSIBILITY.md` in the same pull request.
- Pass and fail logic shared by the gates lives in `scripts/gate-checks.mjs` (`emptyRunProblem`, `blockOffSite`, the exclusion matchers, `locatorCountProblem`), tested by `gate-checks.test.ts`.

The runner and the CI jobs that run these gates: [tier-2-runner-and-ci.md](tier-2-runner-and-ci.md).
2 changes: 1 addition & 1 deletion context/dox/built/tier-6-runbooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Part of [built/index.md](index.md). The weekly sweep, deploy checks and Not doin
- Dwell-ledger handles are 24px wide and lean 8px outward.
- The light hero has its own `background-color`, because axe cannot read a `border-image` band.
- The `/dox/` licence note lives inside the chat shell (`.gmt-hive-licence`); the Starlight footer omits it there.
- `a11y-axe` `color-contrast` (4.5:1) covers all text; the 7:1 house floor is a token rule (`--gmt-ice-dim` and the text tokens), kept by the token tests.
- `a11y-axe` `color-contrast` (4.5:1) covers all text; the 7:1 house floor is a token rule. The token tests hold `--gmt-ice`, `--gmt-cyan-ink` and the syntax roles at 7:1 (`text-contrast.test.ts`, `code-themes.test.ts`) and the globe inks (`globe-contrast.test.ts`). No test holds `--gmt-ice-dim` at 7:1 on every surface.

## Run the gates

Expand Down
1 change: 1 addition & 0 deletions context/dox/tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ builds it.
| 36 | DOX-G17 | — | #559 | Done |
| 37 | DOX-G18 | — | #583 | Done |
| 38 | DOX-G19 | — | #593 | Done |
| 39 | DOX-G20 | — | #592 | Done |

Owed verification, not work:

Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/affected.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export const RULES = [
checks: [],
},
{
test: /^(?:AGENTS\.md|CLAUDE\.md|PUBLISHING\.md|SECURITY\.md|\.gitignore|\.fallowrc\.jsonc|\.oxfmtrc\.json|context7\.json|skills-lock\.json|pyproject\.toml|uv\.lock|tsconfig\.json|vitest\.config\.ts)$/,
test: /^(?:ACCESSIBILITY\.md|AGENTS\.md|CLAUDE\.md|PUBLISHING\.md|SECURITY\.md|\.gitignore|\.fallowrc\.jsonc|\.oxfmtrc\.json|context7\.json|skills-lock\.json|pyproject\.toml|uv\.lock|tsconfig\.json|vitest\.config\.ts)$/,
checks: [],
},
{ test: /^\.github\//, checks: [] },
Expand Down
4 changes: 2 additions & 2 deletions scripts/lib/pr-meta-plan.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export const PATH_RULES = [
{
/* Every root file that is not a document or an agent file is tooling. */
label: "gmt monorepo",
test: /^(?:scripts\/|apps\/dox\/scripts\/|\.github\/(?!workflows\/)|\.vscode\/|\.changeset\/(?:config\.json|README\.md)$|(?!(?:AGENTS|CLAUDE|CONTRIBUTING|PUBLISHING|README|SECURITY)\.md$|LICENSE$)[^/]+$)/,
test: /^(?:scripts\/|apps\/dox\/scripts\/|\.github\/(?!workflows\/)|\.vscode\/|\.changeset\/(?:config\.json|README\.md)$|(?!(?:ACCESSIBILITY|AGENTS|CLAUDE|CONTRIBUTING|PUBLISHING|README|SECURITY)\.md$|LICENSE$)[^/]+$)/,
},
{
label: "documentation",
test: /^(?:context\/(?!skills\.md$)|apps\/dox\/(?!scripts\/)|docs\/|README\.md$|CONTRIBUTING\.md$|PUBLISHING\.md$|SECURITY\.md$|(?:[^/]+\/)*LICENSE$|packages\/[\w-]+\/README\.md$)/,
test: /^(?:context\/(?!skills\.md$)|apps\/dox\/(?!scripts\/)|docs\/|ACCESSIBILITY\.md$|README\.md$|CONTRIBUTING\.md$|PUBLISHING\.md$|SECURITY\.md$|(?:[^/]+\/)*LICENSE$|packages\/[\w-]+\/README\.md$)/,
},
];

Expand Down
Loading