@ngbracket/a11y-devtools 0.10.1 → 0.12.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 +68 -0
- package/README.md +4 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/inpage.global.js +585 -480
- package/dist/keyboard/focus-trap.js +2 -0
- package/dist/keyboard/tab-sequence.d.ts +18 -0
- package/dist/keyboard/tab-sequence.js +52 -1
- package/dist/overlay.js +5 -0
- package/dist/pill-menu.d.ts +35 -0
- package/dist/pill-menu.js +185 -0
- package/dist/provider.d.ts +30 -0
- package/dist/provider.js +136 -20
- package/dist/settings.d.ts +39 -0
- package/dist/settings.js +68 -0
- package/dist/toggle.d.ts +66 -0
- package/dist/toggle.js +204 -0
- package/dist/top-layer.d.ts +40 -0
- package/dist/top-layer.js +117 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,74 @@
|
|
|
3
3
|
All notable changes to `@ngbracket/a11y-devtools` are documented here.
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 0.12.0
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **A settings menu on the pill.** The `⋯` button next to the on/off switch opens a
|
|
11
|
+
panel for choosing what's drawn, so you're not looking at everything at once:
|
|
12
|
+
- **Highlights**, **Tab order** and **Focus preview**, each on or off.
|
|
13
|
+
- **Show issues**: all, moderate and above, serious and above, or critical
|
|
14
|
+
only. It filters what's drawn on the page; the console still logs every issue.
|
|
15
|
+
- How many issues the page has and how many are shown.
|
|
16
|
+
- **Download report**: a self-contained HTML report (the same format as report
|
|
17
|
+
mode) for every route you've visited since the app loaded, labelled by route.
|
|
18
|
+
Each developer's choices are remembered in `localStorage`; only what differs
|
|
19
|
+
from the app's defaults is stored. Needs `overlay: true`.
|
|
20
|
+
- New provider options set the defaults: `layers` (`{ highlights, tabOrder,
|
|
21
|
+
focusPreview }`) and `minImpact`. `highlights` defaults to `true`; `tabOrder`
|
|
22
|
+
and `focusPreview` follow `keyboard`, as before. Tab order and focus preview can
|
|
23
|
+
now also be turned on from the menu without `keyboard: true`, which still
|
|
24
|
+
controls the `ngbr/*` keyboard findings.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **The overlay and the on/off pill now show over modals.** Native
|
|
29
|
+
`<dialog>.showModal()` and popovers render in the browser's top layer, above
|
|
30
|
+
any z-index, and Angular CDK overlays use popovers by default from v22, so that
|
|
31
|
+
covers Material dialogs, menus and selects. The overlay was drawn underneath
|
|
32
|
+
them, and a modal `<dialog>` also made the pill unclickable. The overlay and the
|
|
33
|
+
pill are now top-layer popovers too: while a modal dialog is open they move
|
|
34
|
+
inside it, and they re-show whenever the app opens another popover so they stay
|
|
35
|
+
on top.
|
|
36
|
+
- **No false `ngbr/modal-focus-not-contained` on Angular CDK / Material
|
|
37
|
+
dialogs.** CDK keeps focus in with a JS focus trap (empty `aria-hidden`
|
|
38
|
+
sentinels either side of the dialog) rather than making the page inert. A modal
|
|
39
|
+
bracketed by sentinels (`aria-hidden="true"` or `data-focus-guard`, with no
|
|
40
|
+
content) now counts as containing focus. Checked with real Tab presses on a CDK
|
|
41
|
+
dialog. A modal with no trap is still flagged.
|
|
42
|
+
- **The tab order while a modal is open** only includes the modal's own stops,
|
|
43
|
+
for native modal dialogs and for trapped `aria-modal` dialogs. That removes
|
|
44
|
+
false `ngbr/tab-order-mismatch` findings and tab-order badges on the page behind
|
|
45
|
+
the modal. Focus-trap sentinels are left out of the tab order. Pass
|
|
46
|
+
`includeSentinels: true` to `tabSequence` to keep them.
|
|
47
|
+
|
|
48
|
+
## 0.11.0
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- **Turn the devtools on and off without changing code.** An on/off pill sits in
|
|
53
|
+
the bottom-left corner, and **Alt+Shift+A** does the same from the keyboard. Off
|
|
54
|
+
means no scanning and nothing drawn, so it costs nothing while hidden. The choice
|
|
55
|
+
is remembered in `localStorage`, so it stays off across reloads until you turn it
|
|
56
|
+
back on.
|
|
57
|
+
- New provider options: `enabled` (the starting state before a developer has
|
|
58
|
+
chosen; default `true`), `pill` (a corner, or `false` to hide it; default
|
|
59
|
+
`'bottom-left'`) and `shortcut` (e.g. `'Ctrl+Alt+K'`, or `false`; default
|
|
60
|
+
`'Alt+Shift+A'`). Letter and digit shortcuts match the physical key, so
|
|
61
|
+
Alt/Option combinations work on macOS.
|
|
62
|
+
- The pill is a `role="switch"` button with visible on/off text and a 28px
|
|
63
|
+
target. It's excluded from scans and from the tab-order layer, like the rest of
|
|
64
|
+
the overlay. New exports: `createTogglePill`, `parseShortcut`, `matchesShortcut`,
|
|
65
|
+
`formatShortcut`, `readStoredEnabled`, `writeStoredEnabled`,
|
|
66
|
+
`DEFAULT_TOGGLE_SHORTCUT`, `TOGGLE_STORAGE_KEY` and their types.
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- `tabSequence` leaves out elements inside the overlay's own UI
|
|
71
|
+
(`[data-ngb-a11y-overlay]`), so the pill never appears as a tab stop or counts
|
|
72
|
+
as focus escaping a modal.
|
|
73
|
+
|
|
6
74
|
## 0.10.1
|
|
7
75
|
|
|
8
76
|
### Fixed
|
package/README.md
CHANGED
|
@@ -15,7 +15,10 @@ Part of the `@ngbracket` Angular tooling family.
|
|
|
15
15
|
walking past UI-library components (Material, CDK, Nebular, …) to yours. Uses
|
|
16
16
|
Angular's documented dev debug API (`window.ng`).
|
|
17
17
|
- **In-app provider**: rescans as the app settles; grouped console output and an
|
|
18
|
-
optional on-page overlay.
|
|
18
|
+
optional on-page overlay. Switch it on and off with the on-page pill or
|
|
19
|
+
Alt+Shift+A; the pill's menu picks what's drawn (highlights, tab order, focus
|
|
20
|
+
preview, minimum severity) and downloads an HTML report of the routes you've
|
|
21
|
+
visited. Choices are remembered.
|
|
19
22
|
- **Report mode**: scan many routes headless from the CLI; Markdown, JSON and a
|
|
20
23
|
self-contained HTML report.
|
|
21
24
|
- **CI gating with a baseline**: fail only on *new* issues, so an app with known
|
package/dist/index.d.ts
CHANGED
|
@@ -9,3 +9,5 @@ export { findUncontainedModals, type UncontainedModal } from './keyboard/focus-t
|
|
|
9
9
|
export { createFocusWalkProbe, detectTabTrap, type FocusObservation, type FocusWalkProbe, type TabWalkVerdict, } from './keyboard/focus-walk.js';
|
|
10
10
|
export { describeElement, accessibleDescription, ariaStates, type AxDescription, } from './keyboard/accname.js';
|
|
11
11
|
export { createOverlay, OVERLAY_ATTR, OVERLAY_EXCLUDE_SELECTOR, type A11yOverlay, type OverlayOptions, type AxPanelData, } from './overlay.js';
|
|
12
|
+
export { createTogglePill, parseShortcut, matchesShortcut, formatShortcut, readStoredEnabled, writeStoredEnabled, DEFAULT_TOGGLE_SHORTCUT, TOGGLE_STORAGE_KEY, type PillPosition, type Shortcut, type TogglePill, type TogglePillOptions, } from './toggle.js';
|
|
13
|
+
export type { DevtoolsSettings, MinImpact, OverlayLayers } from './settings.js';
|
package/dist/index.js
CHANGED
|
@@ -9,3 +9,4 @@ export { findUncontainedModals } from './keyboard/focus-trap.js';
|
|
|
9
9
|
export { createFocusWalkProbe, detectTabTrap, } from './keyboard/focus-walk.js';
|
|
10
10
|
export { describeElement, accessibleDescription, ariaStates, } from './keyboard/accname.js';
|
|
11
11
|
export { createOverlay, OVERLAY_ATTR, OVERLAY_EXCLUDE_SELECTOR, } from './overlay.js';
|
|
12
|
+
export { createTogglePill, parseShortcut, matchesShortcut, formatShortcut, readStoredEnabled, writeStoredEnabled, DEFAULT_TOGGLE_SHORTCUT, TOGGLE_STORAGE_KEY, } from './toggle.js';
|