tab-trail 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +145 -2
- package/data/api.json +30 -0
- package/data/features.json +173 -0
- package/data/keys.json +10 -0
- package/data/limits.json +10 -0
- package/data/quiet.json +12 -0
- package/data/read.json +10 -0
- package/data/vs.json +6 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.mjs +14 -0
- package/dist/tab-trail.js +2836 -0
- package/package.json +52 -4
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matjaž Korošec
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,146 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center"><img src=".github/assets/trail.gif" width="960" alt="Tab trail on a small shop page: numbered dots and lines show the path of the Tab key, the orange ring moves with each Tab press, and 2 things Tab never reaches, an Add to cart button and a Send link, are marked in red. The panel on the right counts 7 stops, 2 missed spots and 1 hover-only menu."></p>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Tab trail
|
|
4
|
+
|
|
5
|
+
One click shows the path the Tab key takes through any page, and marks in red what fails WCAG 2.2 AA.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/tab-trail)
|
|
8
|
+
[](https://github.com/matjazkorosec/tab-trail/actions/workflows/ci.yml)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+
Some people only use the keyboard. If Tab skips your "Add to cart" button, they can't buy from you. If it skips "Send" on your contact form, they can't write to you. Even Lighthouse tells you to check this by hand. Tab trail checks it for you.
|
|
12
|
+
|
|
13
|
+
I built it to check every page of my own site with the keyboard. **[Try it on the live page](https://matjazkorosec.com/tools/tab-trail)**, it has 3 things broken on purpose.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
### Bookmark
|
|
18
|
+
|
|
19
|
+
1. Open [matjazkorosec.com/tools/tab-trail](https://matjazkorosec.com/tools/tab-trail) and drag the Tab trail button to your bookmarks bar. Don't see the bookmarks bar? Press Ctrl+Shift+B, or Cmd+Shift+B on a Mac.
|
|
20
|
+
2. Open your site and click the bookmark.
|
|
21
|
+
3. Press Tab and follow the numbers, or press Play and it walks every stop for you. Click the bookmark again or the close button to close it.
|
|
22
|
+
|
|
23
|
+
Your bookmark keeps the version you dragged. To get new checks, delete it and drag the button again.
|
|
24
|
+
|
|
25
|
+
### Console
|
|
26
|
+
|
|
27
|
+
<!-- console:start -->
|
|
28
|
+
Copy [`dist/tab-trail.js`](https://raw.githubusercontent.com/matjazkorosec/tab-trail/v1.0.0/dist/tab-trail.js). On your site press F12, or Cmd+Option+I on a Mac (Cmd+Option+C in Safari), open Console and paste. If it asks, type allow pasting, press Enter, and paste again.
|
|
29
|
+
<!-- console:end -->
|
|
30
|
+
|
|
31
|
+
<!-- firefox:start -->
|
|
32
|
+
Firefox can't store a bookmark longer than 65,536 characters, and the Tab trail bookmark is 223,286. In Firefox, paste the script in the console instead.
|
|
33
|
+
<!-- firefox:end -->
|
|
34
|
+
|
|
35
|
+
### Playwright
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npm i -D --save-exact tab-trail
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The script is in `node_modules/tab-trail/dist/tab-trail.js`. The example below reads a copy saved in your repo instead; both work.
|
|
42
|
+
|
|
43
|
+
## What it lists in red
|
|
44
|
+
|
|
45
|
+
<!-- checks:start -->
|
|
46
|
+
1. **Missed spots** (WCAG 2.1.1 A): A red box marks something that looks clickable, like a box with a pointer cursor, a button role or a click handler in the HTML. The keyboard never gets there. [See it](https://matjazkorosec.com/tools/tab-trail#show-missed-spots)
|
|
47
|
+
2. **Hover menus** (WCAG 2.1.1 A, 2.4.7 AA): A menu that opens on mouse hover but never when Tab reaches it hides its links from keyboard users. Tab trail reads the page's CSS and marks each one with a red box. [See it](https://matjazkorosec.com/tools/tab-trail#show-hover-menus)
|
|
48
|
+
3. **Forced order** (WCAG 2.4.3 A): An element with tabindex="5" gets Tab before the rest of the page, wherever it sits. When that changes the order, it is listed in red: set it to 0 and move the element in the HTML instead. If it was first anyway, the Log only notes it. [See it](https://matjazkorosec.com/tools/tab-trail#show-forced-order)
|
|
49
|
+
4. **Hidden focus** (WCAG 2.4.11 AA): When Tab lands on something a sticky header, a cookie bar or a chat button covers completely, the panel lists it in red. Click it to scroll it into view. Fix it and Tab there again: it leaves the list. This check is new in WCAG 2.2 AA. [See it](https://matjazkorosec.com/tools/tab-trail#show-hidden-focus)
|
|
50
|
+
5. **Keyboard trap** (WCAG 2.1.2 A): When Tab and Shift+Tab both leave focus on the same spot, a keyboard user can't get out. The panel lists that stop in red, once, like "2: Message". A spot that keeps Tab but says how to leave, like a code editor, is not red. [See it](https://matjazkorosec.com/tools/tab-trail#show-keyboard-trap)
|
|
51
|
+
6. **Lost focus** (WCAG 2.4.3 A): When a popup or cookie bar closes, focus should go back to the button that opened it. If it drops to the top of the page instead, the panel lists it in red, like "2 → Start". [See it](https://matjazkorosec.com/tools/tab-trail#show-lost-focus)
|
|
52
|
+
7. **Out of order** (WCAG 2.4.3 A): Each time Tab jumps out of order, the panel lists the jump in red. A popup that blocks the page must get Tab first, or it is flagged too. [See it](https://matjazkorosec.com/tools/tab-trail#show-out-of-order)
|
|
53
|
+
<!-- checks:end -->
|
|
54
|
+
|
|
55
|
+
Each check in full: [docs/checks.md](docs/checks.md). Everything else it does: [docs/features.md](docs/features.md). Keys and how to read the trail: [docs/keys.md](docs/keys.md).
|
|
56
|
+
|
|
57
|
+
## For tests and AI agents
|
|
58
|
+
|
|
59
|
+
Copy for AI copies only the problems, each with its WCAG rule, what should happen, a CSS selector, the HTML, the React, Vue or Angular component that drew it (on a dev build), a fix hint and how to check the fix. Paste it into your coding AI and it knows where to look.
|
|
60
|
+
|
|
61
|
+
While Tab trail is open, the page has `window.__tabTrail`, so a test or an AI agent can run it with no clicks:
|
|
62
|
+
|
|
63
|
+
<!-- api:start -->
|
|
64
|
+
- `await window.__tabTrail.play({ ignore, delay })`: Walks every stop, or until it is paused, then gives back the report. Call it again to go on. ignore is a list of CSS selectors to leave out, like a part broken on purpose. delay is the wait at each stop, 400 ms if you leave it out. An ignore entry that isn't valid CSS makes it fail with an error.
|
|
65
|
+
- `window.__tabTrail.problems()`: Every open problem as data, never cut short: id (the same on every run), check, wcag, selector, html, component, fix, verify.
|
|
66
|
+
- `window.__tabTrail.report()`: The Copy for AI text.
|
|
67
|
+
- `window.__tabTrail.log()`: Every Log line as data: time, result, check, wcag, text, fixed, selector, stop.
|
|
68
|
+
- `window.__tabTrail.state()`: { walked, total, done, untested }. done is true once Play reached the end. untested names the checks that never ran, like Lost focus when no popup was opened, so a green test can tell a clean page from a check that was skipped.
|
|
69
|
+
- `window.__tabTrail.version`: "1.0.0"
|
|
70
|
+
- `window.__tabTrail.close()`: Closes it.
|
|
71
|
+
<!-- api:end -->
|
|
72
|
+
|
|
73
|
+
Full reference: [docs/api.md](docs/api.md).
|
|
74
|
+
|
|
75
|
+
### Playwright example
|
|
76
|
+
|
|
77
|
+
It fails when a check finds a problem, and attaches the whole report.
|
|
78
|
+
|
|
79
|
+
<!-- test:start -->
|
|
80
|
+
Save the script in your repo once, so every CI run uses the version you tested:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
curl -o tests/tab-trail.js https://raw.githubusercontent.com/matjazkorosec/tab-trail/v1.0.0/dist/tab-trail.js
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Then load it with `page.evaluate`, so a strict CSP or Trusted Types don't block it:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
import { readFileSync } from "node:fs";
|
|
90
|
+
import { test, expect } from "@playwright/test";
|
|
91
|
+
|
|
92
|
+
const script = readFileSync("tests/tab-trail.js", "utf8");
|
|
93
|
+
|
|
94
|
+
test("Tab reaches everything", async ({ page }) => {
|
|
95
|
+
test.setTimeout(300_000);
|
|
96
|
+
await page.goto("http://localhost:5173/");
|
|
97
|
+
await page.evaluate(script);
|
|
98
|
+
const { total } = await page.evaluate(() => window.__tabTrail.state());
|
|
99
|
+
for (let i = 0; i <= total; i++) await page.keyboard.press("Tab");
|
|
100
|
+
for (let i = 0; i <= total; i++) await page.keyboard.press("Shift+Tab");
|
|
101
|
+
const report = await page.evaluate(() => window.__tabTrail.play({ ignore: [".third-party-widget"] }));
|
|
102
|
+
await test.info().attach("tab-trail-report.txt", { body: report, contentType: "text/plain" });
|
|
103
|
+
const { done } = await page.evaluate(() => window.__tabTrail.state());
|
|
104
|
+
const problems = await page.evaluate(() => window.__tabTrail.problems());
|
|
105
|
+
expect(done).toBe(true);
|
|
106
|
+
expect(problems.map((p) => `${p.check}: ${p.selector}`)).toEqual([]);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
type Problem = { id: string; check: string; wcag: string | null; selector: string | null; html: string | null; component: string | null; fix: string; verify: string };
|
|
110
|
+
type Line = { time: string; result: string; check: string; wcag: string | null; text: string; fixed: boolean; selector: string | null; stop: number | null };
|
|
111
|
+
|
|
112
|
+
declare global {
|
|
113
|
+
interface Window {
|
|
114
|
+
__tabTrail: {
|
|
115
|
+
version: string;
|
|
116
|
+
play(options?: { ignore?: string[]; delay?: number }): Promise<string>;
|
|
117
|
+
problems(): Problem[];
|
|
118
|
+
report(): string;
|
|
119
|
+
log(): Line[];
|
|
120
|
+
state(): { walked: number; total: number; done: boolean };
|
|
121
|
+
close(): void;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
<!-- test:end -->
|
|
127
|
+
|
|
128
|
+
Already run axe in your tests? Keep it: axe reads the HTML, Tab trail walks the Tab key. Play moves focus itself, so it checks Missed spots, Hover menus, Forced order and Hidden focus. The Tab presses before it, once forward and once back through every stop, judge Out of order and Keyboard trap; Lost focus needs a popup opened and closed. Add the script once per page: running it again closes it. Play takes about half a second a stop, so 300_000 ms covers about 600 stops.
|
|
129
|
+
|
|
130
|
+
## What it does to your page
|
|
131
|
+
|
|
132
|
+
It reads the page and sends nothing: no network requests, no cookies, no local storage. It draws in 1 layer it adds to the page, inside its own shadow root, and closing it removes the layer. It only moves focus and scrolls, the way your Tab key would. Play never clicks.
|
|
133
|
+
|
|
134
|
+
Copy for AI copies the tag, id, classes, role, tabindex, state and ARIA of each element, a short bit of its text, and the nearest id and heading around it. Long numbers, emails and tokens are masked. Read it before you paste it.
|
|
135
|
+
|
|
136
|
+
## Limits
|
|
137
|
+
|
|
138
|
+
It's not a full audit. It is the keyboard part. What a person still checks by hand: [docs/limits.md](docs/limits.md). How it sits next to the tools you know: [docs/compared.md](docs/compared.md).
|
|
139
|
+
|
|
140
|
+
## Contributing
|
|
141
|
+
|
|
142
|
+
Bug and doc fixes can go straight to a pull request. For a new check, setting or panel change, open an issue first. The rules and the dev loop: [CONTRIBUTING.md](CONTRIBUTING.md). Found a bug? Press Copy log in the panel and paste it into a [bug report](https://github.com/matjazkorosec/tab-trail/issues/new/choose).
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
[MIT](LICENSE), Copyright (c) 2026 Matjaž Korošec. Use it, change it and share it, at work too. Every copy keeps the license text at the top of the script.
|
package/data/api.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"call": "await window.__tabTrail.play({ ignore, delay })",
|
|
4
|
+
"gives": "Walks every stop, or until it is paused, then gives back the report. Call it again to go on. ignore is a list of CSS selectors to leave out, like a part broken on purpose. delay is the wait at each stop, 400 ms if you leave it out. An ignore entry that isn't valid CSS makes it fail with an error."
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"call": "window.__tabTrail.problems()",
|
|
8
|
+
"gives": "Every open problem as data, never cut short: id (the same on every run), check, wcag, selector, html, component, fix, verify."
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"call": "window.__tabTrail.report()",
|
|
12
|
+
"gives": "The Copy for AI text."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"call": "window.__tabTrail.log()",
|
|
16
|
+
"gives": "Every Log line as data: time, result, check, wcag, text, fixed, selector, stop."
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"call": "window.__tabTrail.state()",
|
|
20
|
+
"gives": "{ walked, total, done, untested }. done is true once Play reached the end. untested names the checks that never ran, like Lost focus when no popup was opened, so a green test can tell a clean page from a check that was skipped."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"call": "window.__tabTrail.version",
|
|
24
|
+
"gives": "\"VERSION\""
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"call": "window.__tabTrail.close()",
|
|
28
|
+
"gives": "Closes it."
|
|
29
|
+
}
|
|
30
|
+
]
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
{
|
|
2
|
+
"groups": [
|
|
3
|
+
{
|
|
4
|
+
"id": "red",
|
|
5
|
+
"title": "What it lists in red"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"id": "read",
|
|
9
|
+
"title": "How to read the trail"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "work",
|
|
13
|
+
"title": "How to work with it"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "settings",
|
|
17
|
+
"title": "Settings"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"items": [
|
|
21
|
+
{
|
|
22
|
+
"group": "red",
|
|
23
|
+
"wcag": "2.1.1 A",
|
|
24
|
+
"title": "Missed spots",
|
|
25
|
+
"short": "\"2 look clickable, but Tab skips them.\" Red boxes mark them.",
|
|
26
|
+
"long": "A red box marks something that looks clickable, like a box with a pointer cursor, a button role or a click handler in the HTML. The keyboard never gets there."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"group": "red",
|
|
30
|
+
"wcag": "2.1.1 A, 2.4.7 AA",
|
|
31
|
+
"title": "Hover menus",
|
|
32
|
+
"short": "\"1 menu or box opens only on mouse hover.\"",
|
|
33
|
+
"long": "A menu that opens on mouse hover but never when Tab reaches it hides its links from keyboard users. Tab trail reads the page's CSS and marks each one with a red box."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"group": "red",
|
|
37
|
+
"wcag": "2.4.3 A",
|
|
38
|
+
"title": "Forced order",
|
|
39
|
+
"short": "\"1 stop has tabindex above 0, which pulls it ahead of the page.\"",
|
|
40
|
+
"long": "An element with tabindex=\"5\" gets Tab before the rest of the page, wherever it sits. When that changes the order, it is listed in red: set it to 0 and move the element in the HTML instead. If it was first anyway, the Log only notes it."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"group": "red",
|
|
44
|
+
"wcag": "2.4.11 AA",
|
|
45
|
+
"title": "Hidden focus",
|
|
46
|
+
"short": "\"1 stop is hidden when Tab reaches it.\" Under a sticky bar.",
|
|
47
|
+
"long": "When Tab lands on something a sticky header, a cookie bar or a chat button covers completely, the panel lists it in red. Click it to scroll it into view. Fix it and Tab there again: it leaves the list. This check is new in WCAG 2.2 AA."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"group": "red",
|
|
51
|
+
"wcag": "2.1.2 A",
|
|
52
|
+
"title": "Keyboard trap",
|
|
53
|
+
"short": "\"1 stop where Tab gets stuck.\"",
|
|
54
|
+
"long": "When Tab and Shift+Tab both leave focus on the same spot, a keyboard user can't get out. The panel lists that stop in red, once, like \"2: Message\". A spot that keeps Tab but says how to leave, like a code editor, is not red."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"group": "red",
|
|
58
|
+
"wcag": "2.4.3 A",
|
|
59
|
+
"title": "Lost focus",
|
|
60
|
+
"short": "\"1 popup loses focus when it closes.\"",
|
|
61
|
+
"long": "When a popup or cookie bar closes, focus should go back to the button that opened it. If it drops to the top of the page instead, the panel lists it in red, like \"2 → Start\"."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"group": "red",
|
|
65
|
+
"wcag": "2.4.3 A",
|
|
66
|
+
"title": "Out of order",
|
|
67
|
+
"short": "\"1 time Tab jumped out of order.\"",
|
|
68
|
+
"long": "Each time Tab jumps out of order, the panel lists the jump in red. A popup that blocks the page must get Tab first, or it is flagged too."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"group": "read",
|
|
72
|
+
"title": "Tab order",
|
|
73
|
+
"short": "Numbers show where Tab goes. The orange one is where you are.",
|
|
74
|
+
"long": "Each dot is 1 press of the Tab key, in the order the keyboard visits, and the one you are on turns orange. A line that jumps all over the page will confuse people."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"group": "read",
|
|
78
|
+
"title": "Hidden links",
|
|
79
|
+
"short": "Skip links show as dashed dots.",
|
|
80
|
+
"long": "Some links stay hidden until Tab reaches them, like \"Skip to content\". They get a dashed dot in the top left corner."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"group": "read",
|
|
84
|
+
"title": "Inside dialogs",
|
|
85
|
+
"short": "A dialog opens? The trail goes in too.",
|
|
86
|
+
"long": "When a page opens a modal dialog (the HTML <dialog> element), the trail goes in too and shows only the stops there. Close it and the page comes back."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"group": "read",
|
|
90
|
+
"title": "Late arrivals",
|
|
91
|
+
"short": "Scroll, and new buttons get counted.",
|
|
92
|
+
"long": "It checks again as you scroll. Buttons that only appear later, like a back to top arrow, get counted too."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"group": "read",
|
|
96
|
+
"title": "Big pages",
|
|
97
|
+
"short": "Over 50 stops? See 50 at a time.",
|
|
98
|
+
"long": "Over 50 stops, it shows 50 at a time. Next and Previous page through them, and Tab turns the page for you. Untick Show 50 stops at a time to see them all."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"group": "work",
|
|
102
|
+
"title": "Copy for AI",
|
|
103
|
+
"short": "Paste the problems into your AI. It gets the fix.",
|
|
104
|
+
"long": "Copies only the problems, each with its WCAG rule, a CSS selector, the HTML, the component and a fix hint. Paste it into your coding AI and it knows where to look."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"group": "work",
|
|
108
|
+
"title": "Out of the way",
|
|
109
|
+
"short": "Drag the panel anywhere, or send it to a corner.",
|
|
110
|
+
"long": "Grab the panel and drag it anywhere, or press the corner button to move it to the next corner. It only moves by itself to stay on screen when it grows, and Compact view under Settings keeps it small."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"group": "work",
|
|
114
|
+
"title": "Play it",
|
|
115
|
+
"short": "No Tab key? Press Play, it walks every stop.",
|
|
116
|
+
"long": "Play moves focus through every stop for you and checks each one, then 1 line sums up all 7 checks. It only moves focus, it never clicks."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"group": "work",
|
|
120
|
+
"title": "The count",
|
|
121
|
+
"short": "Fix it, run it again, compare.",
|
|
122
|
+
"long": "The panel counts the stops and the spots Tab skips. Fix something, run it again and compare the numbers."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"group": "work",
|
|
126
|
+
"title": "Find it",
|
|
127
|
+
"short": "Click a red spot in the list to see it.",
|
|
128
|
+
"long": "The panel lists every spot Tab never reaches, named by its label or text, 50 at a time. Click one and the page scrolls to it and outlines it."
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"group": "work",
|
|
132
|
+
"title": "Log",
|
|
133
|
+
"short": "See every check, the good ones too.",
|
|
134
|
+
"long": "Every check as it runs: OK, PROBLEM, SKIPPED with why, or INFO. Filter it, tick Show WCAG to see each rule, click a stop number to jump there, copy it for a bug report, or keep it live in a new tab."
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"group": "work",
|
|
138
|
+
"title": "Keyboard",
|
|
139
|
+
"short": "No mouse? Ctrl+Shift+F jumps into the panel.",
|
|
140
|
+
"long": "Press Ctrl+Shift+F, on a Mac and on Windows, and focus jumps to Play in the panel, where Tab reaches every button. Escape takes you back to the stop you were on."
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"group": "work",
|
|
144
|
+
"title": "Jump there",
|
|
145
|
+
"short": "Click a number and focus moves there.",
|
|
146
|
+
"long": "Click any number and focus moves to that spot, as if you had tabbed there. The next Tab goes on from it, and it is not counted as a jump."
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"group": "settings",
|
|
150
|
+
"title": "Spotlight",
|
|
151
|
+
"short": "Dim the page, light up where Tab is.",
|
|
152
|
+
"long": "Open Settings and tick Spotlight: the page goes dark except what Tab is on, so you follow it the way a keyboard user does. A missing focus ring is easy to spot, even for someone watching."
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"group": "settings",
|
|
156
|
+
"title": "Show lines",
|
|
157
|
+
"short": "Just the numbers? Untick Show lines.",
|
|
158
|
+
"long": "Open Settings and untick Show lines, and only the numbered dots stay. Long lines turns grey until you tick Show lines again."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"group": "settings",
|
|
162
|
+
"title": "Long lines",
|
|
163
|
+
"short": "Too many lines? Untick Long lines.",
|
|
164
|
+
"long": "Open Settings, untick Long lines, and no line is over 100 px. A longer one becomes 2 arrows, 1 from each stop. A line off screen becomes 1 arrow pointing its way."
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"group": "settings",
|
|
168
|
+
"title": "Out of Tab",
|
|
169
|
+
"short": "The panel stays out of the trail.",
|
|
170
|
+
"long": "Leave this panel out of Tab is ticked at first, so Tab never runs into the panel. Untick it and Tab reaches the panel's buttons too. Ctrl+Shift+F gets you in either way."
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
package/data/keys.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Keys",
|
|
3
|
+
"items": [
|
|
4
|
+
"Tab, Shift+Tab: Move along the trail.",
|
|
5
|
+
"Click a number: Focus jumps there. Click empty space and no stop is lit, so the next Tab is not judged.",
|
|
6
|
+
"Space, Tab, Escape: Pause Play. A click on the page pauses it too.",
|
|
7
|
+
"Ctrl+Shift+F: Jumps into the panel, on a Mac and on Windows. Escape takes you back to the stop you were on.",
|
|
8
|
+
"Escape: Closes it once you click empty space on the page, so the page's own menus keep Escape. The close button or the bookmark again close it too."
|
|
9
|
+
]
|
|
10
|
+
}
|
package/data/limits.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[
|
|
2
|
+
"It spots clickable things by the pointer cursor, button roles and onclick in the HTML. A link with no address and no pointer cursor, or a click handler added only by script, stays hidden.",
|
|
3
|
+
"It checks that Tab gets there, not that Enter or Space then works.",
|
|
4
|
+
"A loop that Tab never leaves, but Shift+Tab does, shows as Out of order, not Keyboard trap.",
|
|
5
|
+
"It doesn't compare Tab order with the order you see. If CSS moves things around, follow the numbers and check it yourself.",
|
|
6
|
+
"Play moves focus in Tab order without pressing the key, so code that listens for the Tab key only runs when you press Tab.",
|
|
7
|
+
"It doesn't check the focus ring's look or contrast (it only flags links that stay invisible while they have focus), or what a screen reader says. Use Spotlight to look for yourself, and VoiceOver or NVDA to listen. Pages inside frames and web components with closed shadow roots are skipped.",
|
|
8
|
+
"Style sheets loaded from other sites without CORS can't be read, so hover menus styled there are not checked.",
|
|
9
|
+
"It's made for Chrome, Edge, Firefox and Safari on a desktop computer. On a Mac, turn on Tab for links first, and Firefox needs the console."
|
|
10
|
+
]
|
package/data/quiet.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "When it stays quiet on purpose",
|
|
3
|
+
"items": [
|
|
4
|
+
"Tab reaches 1 item of a tab list, menu, list box, radio group, grid, tree or toolbar: the arrow keys do the rest, so the other items are not red.",
|
|
5
|
+
"A stop only partly under a sticky bar passes AA 2.4.11. The Log adds that AAA 2.4.12 wants it fully visible.",
|
|
6
|
+
"Jumps into or inside a popup are fine, and small bars that leave the page usable are never flagged.",
|
|
7
|
+
"A popup closed by a click outside it is not judged for Lost focus.",
|
|
8
|
+
"On a Mac, a Tab press that skips only links (Firefox) or only links and buttons (Safari) is SKIPPED, not a jump, until you turn on Tab for them.",
|
|
9
|
+
"Tab moving inside a date field, a video or a frame is SKIPPED: those have parts of their own.",
|
|
10
|
+
"After a skip link moves focus to the main content, the next Tab is judged from there, not from the top."
|
|
11
|
+
]
|
|
12
|
+
}
|
package/data/read.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"items": [
|
|
3
|
+
"A green 0 means that check found nothing. A red number means it found something, and the chips under it take you there.",
|
|
4
|
+
"In the Log, OK passed, PROBLEM needs a fix, SKIPPED was not judged and says why, and INFO is a note.",
|
|
5
|
+
"Out of order is judged only for the Tab presses you make. Press Tab to the end, then Shift+Tab back.",
|
|
6
|
+
"Hidden focus is judged once the page stops scrolling. Press Play to test every stop.",
|
|
7
|
+
"Lost focus is judged only for the popups you open and close.",
|
|
8
|
+
"Everything is tested at your window size. Try a narrow window too."
|
|
9
|
+
]
|
|
10
|
+
}
|
package/data/vs.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
[
|
|
2
|
+
"Accessibility Insights, ANDI, WAVE, taba11y, Polypane, Firefox's Show Tabbing Order and the paid axe DevTools keyboard test all number your Tab stops, and Insights and paid axe flag some Tab problems too. Chrome DevTools shows the order of the HTML, not the order Tab takes. Tab trail numbers them too, then checks the things below.",
|
|
3
|
+
"It reads your CSS for menus that open only for the mouse, tests every stop for focus hidden under a sticky bar, and catches focus lost when a popup closes.",
|
|
4
|
+
"It hands each problem to your AI with a selector and a fix hint, and gives your tests window.__tabTrail.",
|
|
5
|
+
"Use them together. Tab trail is the keyboard part."
|
|
6
|
+
]
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const VERSION: string;
|
|
2
|
+
export declare const UPDATED: string;
|
|
3
|
+
export declare const CODE: string;
|
|
4
|
+
export declare const FILE: string;
|
|
5
|
+
export declare const HREF: string;
|
|
6
|
+
export declare const GROUPS: { id: "red" | "read" | "work" | "settings"; title: string }[];
|
|
7
|
+
export declare const FEATURES: { title: string; short: string; long: string; group: "red" | "read" | "work" | "settings"; wcag?: string }[];
|
|
8
|
+
export declare const KEYS: { title?: string; items: string[] };
|
|
9
|
+
export declare const READ: { title?: string; items: string[] };
|
|
10
|
+
export declare const QUIET: { title?: string; items: string[] };
|
|
11
|
+
export declare const API: { call: string; gives: string }[];
|
|
12
|
+
export declare const LIMITS: string[];
|
|
13
|
+
export declare const VS: string[];
|
|
14
|
+
export declare const CHANGES: { v: string; t: string }[];
|