Skip to content

Improve docs mobile table readability and homepage video accessibility metadata#26660

Merged
pelikhan merged 5 commits intomainfrom
copilot/update-multi-device-docs-testing-report
Apr 16, 2026
Merged

Improve docs mobile table readability and homepage video accessibility metadata#26660
pelikhan merged 5 commits intomainfrom
copilot/update-multi-device-docs-testing-report

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

The multi-device docs report flagged unlabeled mobile table cards across several pages and missing accessible video metadata on the homepage. This update makes table labels available at build time and adds descriptive metadata for the two homepage videos.

  • Build-time markdown table labels (mobile card layout)

    • Added a remark plugin to inject data-label on each markdown table <td> from its corresponding header text.
    • Registered the plugin in Astro markdown config so labels exist in generated HTML (not only after client-side JS runs).
  • Video accessibility metadata on homepage

    • Extended the Video component with an optional title prop.
    • Applied descriptive titles to both homepage videos.
    • aria-label now falls back to title, then caption, then a filename-derived label to avoid unlabeled videos.
  • Coverage for the reported regressions

    • Added a docs test that asserts markdown table cells include expected data-label values with JavaScript disabled.
    • Added a homepage test that asserts both video elements expose descriptive title attributes.
// remark plugin behavior (simplified)
const headers = headerRow.children.map((cell) => getText(cell).trim());
for (const [index, cell] of row.children.entries()) {
  cell.data = { ...(cell.data || {}), hProperties: { ...(cell.data?.hProperties || {}), 'data-label': headers[index] } };
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=29500 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/playwright_chromiumdev_profile-7yDEr6 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17360506367016700875,15478804173725202895,262144 --enable-features=CDPScreenshotNewSurface --disable-features=AutoDeElevate,AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHints,PaintHolding,Rend GOMODCACHE go (dns block)
    • Triggering command: /usr/bin/chromium-browser /usr/bin/chromium-browser --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl 64/bin/go GOINSECURE GOMOD GOMODCACHE go (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=29669 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/playwright_chromiumdev_profile-cHsCHn --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13644703032059295911,1697239941215651294,262144 --enable-features=CDPScreenshotNewSurface --disable-features=AutoDeElevate,AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHints,PaintHolding,Rend GOMODCACHE go (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=29500 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/playwright_chromiumdev_profile-7yDEr6 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17360506367016700875,15478804173725202895,262144 --enable-features=CDPScreenshotNewSurface --disable-features=AutoDeElevate,AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHints,PaintHolding,Rend GOMODCACHE go (dns block)
    • Triggering command: /usr/bin/chromium-browser /usr/bin/chromium-browser --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl 64/bin/go GOINSECURE GOMOD GOMODCACHE go (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=29669 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/playwright_chromiumdev_profile-cHsCHn --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13644703032059295911,1697239941215651294,262144 --enable-features=CDPScreenshotNewSurface --disable-features=AutoDeElevate,AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHints,PaintHolding,Rend GOMODCACHE go (dns block)
  • telemetry.astro.build
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro dev --host 127.0.0.1 --port 4321 64/bin/go GOINSECURE GOMOD GOMODCACHE go env js/**/*.json&#39; --ignore-path ../../../.prettierignore GO111MODULE in/dist/ripgrep/bin/linux-x64/rg GOINSECURE GOMOD GOMODCACHE in/dist/ripgrep/bin/linux-x64/rg (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro dev --host 127.0.0.1 --port 4321 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro dev --host 127.0.0.1 --port 4321 64/bin/go GOINSECURE GOMOD GOMODCACHE go env bel GO111MODULE ode_modules/.bin/node GOINSECURE GOMOD GOMODCACHE go (dns block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=29500 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/playwright_chromiumdev_profile-7yDEr6 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,17360506367016700875,15478804173725202895,262144 --enable-features=CDPScreenshotNewSurface --disable-features=AutoDeElevate,AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHints,PaintHolding,Rend GOMODCACHE go (dns block)
    • Triggering command: /usr/bin/chromium-browser /usr/bin/chromium-browser --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Transl 64/bin/go GOINSECURE GOMOD GOMODCACHE go (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=29669 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/playwright_chromiumdev_profile-cHsCHn --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13644703032059295911,1697239941215651294,262144 --enable-features=CDPScreenshotNewSurface --disable-features=AutoDeElevate,AvoidUnnecessaryBeforeUnloadCheckSync,BoundaryEventDispatchTracksNodeRemoval,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,OptimizationHints,PaintHolding,Rend GOMODCACHE go (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update multi-device docs testing report for 2026-04-16 Improve docs mobile table readability and homepage video accessibility metadata Apr 16, 2026
Copilot AI requested a review from pelikhan April 16, 2026 15:53
@pelikhan pelikhan marked this pull request as ready for review April 16, 2026 15:57
Copilot AI review requested due to automatic review settings April 16, 2026 15:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves docs accessibility and mobile readability by adding build-time labels for markdown table cells and descriptive metadata for homepage videos, with Playwright coverage.

Changes:

  • Added a remark plugin to inject data-label attributes into markdown table <td> cells at build time.
  • Extended the Video component to support an optional title prop and improved aria-label fallback behavior.
  • Added Playwright tests to validate table data-label output with JS disabled and to assert title attributes on homepage videos.
Show a summary per file
File Description
docs/tests/mobile-responsive.spec.ts Adds a JS-disabled Playwright test to assert data-label attributes exist on rendered markdown tables.
docs/tests/homepage-links.spec.ts Adds a Playwright test asserting homepage videos expose descriptive title attributes.
docs/src/lib/remark/tableDataLabels.js New remark plugin that copies header text into per-cell data-label attributes for tables.
docs/src/content/docs/index.mdx Supplies descriptive title props for the two homepage videos.
docs/src/components/Video.astro Adds title prop support and improves accessible labeling fallback for videos.
docs/astro.config.mjs Registers the new remark plugin in Astro markdown config so labels are present at build time.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 6/6 changed files
  • Comments generated: 2

Comment on lines +19 to +26
const context = await browser.newContext({
javaScriptEnabled: false,
viewport: { width: 393, height: 852 },
});
const page = await context.newPage();

await page.goto('/gh-aw/reference/engines/');
await page.waitForLoadState('domcontentloaded');
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

browser.newContext() here won't inherit the project baseURL from playwright.config.ts, so page.goto('/gh-aw/reference/engines/') will fail with an invalid/relative URL in this manually-created context. Pass baseURL into newContext() (or navigate using an absolute URL derived from the configured baseURL) so the test can run reliably.

Copilot uses AI. Check for mistakes.
Comment on lines +23 to +32
const page = await context.newPage();

await page.goto('/gh-aw/reference/engines/');
await page.waitForLoadState('domcontentloaded');

const firstTableCell = page.locator('.sl-markdown-content table tbody td').first();
await expect(firstTableCell).toBeVisible();
await expect(firstTableCell).toHaveAttribute('data-label', 'Engine');

await context.close();
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

If an assertion fails before context.close() is reached, the custom browser context can leak and affect subsequent tests. Wrap the test body in a try/finally (or use Playwright fixtures) to guarantee the context is closed.

Suggested change
const page = await context.newPage();
await page.goto('/gh-aw/reference/engines/');
await page.waitForLoadState('domcontentloaded');
const firstTableCell = page.locator('.sl-markdown-content table tbody td').first();
await expect(firstTableCell).toBeVisible();
await expect(firstTableCell).toHaveAttribute('data-label', 'Engine');
await context.close();
try {
const page = await context.newPage();
await page.goto('/gh-aw/reference/engines/');
await page.waitForLoadState('domcontentloaded');
const firstTableCell = page.locator('.sl-markdown-content table tbody td').first();
await expect(firstTableCell).toBeVisible();
await expect(firstTableCell).toHaveAttribute('data-label', 'Engine');
} finally {
await context.close();
}

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot mentioned this pull request Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: N/A

i️ Outside scoring scope — all changed test files are TypeScript/Playwright (.spec.ts). The sentinel scores Go (*_test.go) and JavaScript (*.test.cjs, *.test.js) tests only.

Metric Value
New/modified tests analyzed (Go + JS) 0
TypeScript/Playwright tests detected 2 (outside scope)
🚨 Coding-guideline violations None

Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 0 tests — none changed
  • 🟨 JavaScript (*.test.cjs, *.test.js): 0 tests — none changed

i️ 2 TypeScript/Playwright (*.spec.ts) tests were found and are outside the current analysis scope (Go and JavaScript only).


TypeScript/Playwright Tests Detected (Informational)

Test File Quality Observation
'should provide descriptive title attributes on homepage videos' docs/tests/homepage-links.spec.ts ✅ Behavioral contract — verifies accessibility title attributes on <video> elements; no-JS variant not needed for attribute presence
'should include markdown table data-label attributes without JavaScript' docs/tests/mobile-responsive.spec.ts ✅ Behavioral contract — explicitly disables JS to confirm server-side data-label rendering; directly validates the critical invariant of the new remark plugin

Both new tests verify observable behavioral contracts (accessibility attributes, server-side rendering) rather than implementation details. The JS-disabled context in the table test is particularly valuable — it catches the exact regression the feature guards against.

Test inflation check:

  • homepage-links.spec.ts: +14 lines test / +10 lines Video.astro → ratio 1.4:1 ✅
  • mobile-responsive.spec.ts: +17 lines test / +70 lines tableDataLabels.js → ratio 0.24:1 ✅

Verdict

No issues found. No Go or JavaScript tests were added/modified in this PR. The two TypeScript/Playwright tests added look well-structured — both verify behavioral contracts, cover the critical no-JS rendering path, and show no test inflation.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct

Goal: Shift toward tests that describe the system's behavioral contract.

References: §24520356549

🧪 Test quality analysis by Test Quality Sentinel · ● 426.2K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: N/A (no Go or JavaScript tests changed). No coding-guideline violations detected. The two TypeScript/Playwright tests added are well-structured behavioral contract tests.

@pelikhan pelikhan merged commit 82d2755 into main Apr 16, 2026
52 checks passed
@pelikhan pelikhan deleted the copilot/update-multi-device-docs-testing-report branch April 16, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🔍 Multi-Device Docs Testing Report - 2026-04-16

3 participants