Skip to content

Commit 0322e65

Browse files
committed
test: align narration and keyboard focus expectations
1 parent 05a233b commit 0322e65

5 files changed

Lines changed: 31 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- E2E narration expectations include the nested-list fixture content, and the keyboard focus-ring test accounts for the explanations toggle revealed when the splitter receives focus.
12+
913
## [0.2.0-beta.11] - 2026-10-18
1014

1115
### Added

‎docs/dev/PROJECT.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ The page structure is our own CSS grid (`div.layout` > `div.docs-column` (`main.
355355

356356
| Feature | Context A | Context B | Notes |
357357
|---|---|---|---|
358+
| Keyboard focus reveals new Tab stops | Shift+Tab from a file tab reaches the explanations splitter while its toggle is hidden | The splitter's `:focus-within` reveals Hide explanations, so the next Tab reaches that button before returning to the file tab | Forward and backward Tab navigation are not symmetric when focus changes visibility. `e2e/tutorial-page.spec.ts` checks splitter → toggle → selected file tab before checking the keyboard focus ring. |
359+
| Shared fixture prose and narration assertions | Adding list examples to a closed disclosure preserves its initial layout | Narration with collapsed sections enabled reads that new content, including when explanations are hidden | Search `e2e/speech.spec.ts` for exact spoken-text expectations whenever editing `fixtures/framework-fixture/tutorial/tutorial.mdx`; list layout and narration tests share this fixture. |
358360
| Hidden explanations and scroll events | A pointer selection marks the docs scroller as user-controlled | Hiding its ancestor reports `scrollTop = 0` and can deliver scroll callbacks, which previously activated the intro or first step | Both scroll-driven step activation paths ignore a docs panel with zero `clientHeight`; keyboard navigation still works while it is hidden. Regression: `e2e/presentation.spec.ts` (select, hide, navigate, show). |
359361
| Starlight locals in website overrides | Starlight sets `Astro.locals.starlightRoute` at runtime | `astro check` in `site/` does not load Starlight's global types merely because the integration is configured in `.mjs` | `site/src/env.d.ts` references `@astrojs/starlight`, whose entry point imports the global declarations. Keep it when adding overrides that read route data (the Markdown source link, 2026-10-17). |
360362
| Astro glob loader metadata | Unchanged Markdown keeps its content digest and cached parsed data | Changing only `parseData` helpers does not invalidate that digest, so newly added metadata may be absent in an existing dev server or cached build | The website source link derives its URL from the stable content ID through `docsSourceUrl()` instead of relying on new cached metadata fields. Check both dev and preview after changing content metadata. |
@@ -398,6 +400,7 @@ The page structure is our own CSS grid (`div.layout` > `div.docs-column` (`main.
398400
| `JSON.parse` error position (Node/V8) | "Expected …" / "Unterminated string" messages include `position N (line L column C)` | "Unexpected token …" messages have no position | `readErrorRule()` reports those at line 1; do not rely on the message for exact positions |
399401
| Response headers in the runner | Same-origin or CORS-safelisted headers (`Content-Type`, `Content-Length`…): readable | Other headers of a cross-origin response: hidden unless listed in `Access-Control-Expose-Headers` | The Headers tab lists `response.headers` as the browser exposes them (lowercase names) and says so |
400402
| npm trusted publishing provenance | Missing or mismatched package `repository.url` | URL matching the GitHub provenance repository | Publish can fail with E422; npm may normalize the URL to `git+https://github.com/<owner>/<repo>.git` |
403+
| npm publish acceptance vs install availability | `npm publish` and GitHub Actions succeed, with a notice that the package is being processed | The registry can still return 404 for the version and retain the previous `latest`; pnpm reports `ERR_PNPM_NO_MATCHING_VERSION` | npm scans new versions before making them installable, typically around five minutes, sometimes 15 minutes or more (not guaranteed). Seen for core beta.11 while the scaffolder was already available. Check `npm view interactive-code-scroll@0.2.0-beta.11 version --prefer-online` before retrying the install; do not assume a pnpm cache problem or republish just because the workflow succeeded. [Official explanation](https://github.blog/changelog/2026-07-28-npm-publish-time-malware-scanning-and-dual-use-metadata/). |
401404
| npm publish `E404 Not Found` on `PUT` | Trusted publishing configured and valid: publishes | Expired trusted publishing setup on npmjs.com (seen for `create-interactive-code-scroll`, 0.2.0-beta.1) | The 404 hides an auth failure. Renew it in the package's Settings → Trusted publishing (GitHub Actions, `hhkaos/interactive-code-scroll`, `publish-npm.yml`, environment `npm-publish`, "Allow npm publish"), then re-run the workflow: versions already on npm are skipped. Older `gh` has no `rerun --failed`; `gh run rerun <id>` is safe |
402405
| Shiki line layout | `.line` as `inline-block` inside `<pre>` | `.line` as `block` inside `<pre>` | Block line spans can make Shiki's inter-line text nodes render as extra vertical spacing; keep lines inline-level and assert adjacent line spacing in E2E |
403406
| MDX frontmatter in Sätteri plugins | `ctx.source` has the frontmatter blanked out (lines kept) | Astro parses it first and seeds `ctx.data.astro.frontmatter` | Read the parsed object from `ctx.data`; get key line numbers from the file on disk (`frontmatterKeyLines`) |

‎docs/dev/documentation-review.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"changes": [
3+
{
4+
"change": "E2E narration expectations include the nested-list fixture content, and the keyboard focus-ring test accounts for the explanations toggle revealed when the splitter receives focus.",
5+
"reason": "Test-only corrections for existing fixture content and focus-dependent toggle visibility; no runtime behavior, public API or authoring instructions changed."
6+
},
37
{
48
"change": "Tutorial lists use consistent item spacing, preserve paragraph separation within items and remove the extra bottom gap after nested lists.",
59
"docs": [
@@ -159,7 +163,7 @@
159163
}
160164
],
161165
"sourceDigest": "5f6dad69036a3198ff1e1f2a88cde05fa5872f8ee4ce1cde51d6d347976742ca",
162-
"changelogDigest": "b81895ee638f56634b870a13ea1598b235c70a12db606e9e0523dabd0fdbcf67",
166+
"changelogDigest": "e46aedccc1f4b2eb48f941d2bc9b099ac3472ca55f9fc9491f5c27de68ab4c86",
163167
"documents": {
164168
"README.md": "05032d254b5a82cdead0bf6d7d724d4bbe9ff162cfc9bf99d985622f7325abc8",
165169
"docs/authoring.md": "8018da431067f9505299368487323fe67dd25bb45f015429571306a60dbfe91f",

‎e2e/speech.spec.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,21 @@ test("starting with hidden explanations reads prose, hints and collapsed section
170170
"See the example docs.",
171171
"Why register more than one behavior?",
172172
"registerOAuthInfos() accepts an array so one app can register more than one configuration.",
173+
"Review the project and its files before changing the configuration.",
174+
"This longer item wraps in a narrow explanations panel.",
175+
"Configure the project with these nested actions:",
176+
"Set the project name.",
177+
"Choose the output folder.",
178+
"Keep generated files together.",
179+
"Keep source files separate.",
180+
"Run the project after reviewing the configuration.",
181+
"The next list uses paragraphs inside its items.",
182+
"Review the settings.",
183+
"Include a second paragraph when the item needs more explanation.",
184+
"Check the defaults.",
185+
"Save the changes.",
186+
"Continue with the tutorial.",
187+
"The lists keep their normal separation from surrounding prose.",
173188
"Use registered behaviors to respond to changes.",
174189
"About registered behaviors: Callbacks registered for the fixture’s interactions.",
175190
];

‎e2e/tutorial-page.spec.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,10 @@ test("shows the file tab focus ring for keyboard focus only", async ({ page }) =
340340
await expect(page.locator('calcite-tab-title[data-file="main.js"]')).toBeFocused();
341341
expect(await ring("main.js")).toBe("rgba(0, 0, 0, 0)");
342342
await page.keyboard.press("Shift+Tab");
343+
await expect(page.locator('.splitter[aria-orientation="vertical"]')).toBeFocused();
344+
// Focusing the splitter reveals its Hide explanations control, adding a Tab stop.
345+
await page.keyboard.press("Tab");
346+
await expect(page.locator("#docs-toggle")).toBeFocused();
343347
await page.keyboard.press("Tab");
344348
await expect(page.locator('calcite-tab-title[data-file="main.js"]')).toBeFocused();
345349
// Calcite fades the ring in (outline-color transition, 0.15s): right after Tab it may still be transparent.

0 commit comments

Comments
 (0)