Skip to content

fix(a11y): add tabIndex=-1 to main landmark + harden skip-link e2e test#474

Merged
perasperaactual merged 1 commit into
devfrom
fix/a11y-skip-link-tabindex-ssr-test
May 31, 2026
Merged

fix(a11y): add tabIndex=-1 to main landmark + harden skip-link e2e test#474
perasperaactual merged 1 commit into
devfrom
fix/a11y-skip-link-tabindex-ssr-test

Conversation

@perasperaactual
Copy link
Copy Markdown
Contributor

Summary

Closes stackwright-8c4 (P1 a11y) and stackwright-pzr (P2 e2e test fix).

Changes

packages/core/src/components/structural/PageLayout.tsx

  • Added tabIndex={-1} to <main id="main-content"> — the skip-to-content link already existed as the first focusable element, but without tabIndex={-1} on the target, keyboard focus did not actually move to the main content area when the skip link was activated. This is required for WCAG 2.4.1 Level A compliance.

packages/e2e/tests/a11y/keyboard-navigation.spec.ts

  • Hardened the skip-link test from a soft if check (console.warn only) to a hard assertion that fails CI if the skip link is absent or non-functional.

packages/e2e/tests/edge-cases/error-scenarios.spec.ts

  • Skipped the 'JavaScript disabled shows SSR content' test with an explanatory comment. App Router output: 'export' is intentionally client-rendered — the framework is correct, the test was wrong.

Testing

  • pnpm test passes
  • pnpm lint passes
  • Changeset included for @stackwright/core (patch)

…st (stackwright-8c4)

- Add tabIndex={-1} to <main id="main-content"> so activating the
  skip-to-content link actually moves keyboard focus (not just scrolls)
- Harden skip-link e2e test from soft console.warn to hard expect assertion
- Skip SSR test that was incorrect for App Router static export (stackwright-pzr)
@github-actions
Copy link
Copy Markdown
Contributor

✅ Visual Regression Test Results

Status: ✅ All visual tests passed!

All screenshots match the baseline. No visual regressions detected! 🎉

@github-actions
Copy link
Copy Markdown
Contributor

⚡ Performance Benchmark Results

✅ Build Time Benchmarks: PASSED

❌ Bundle Size Benchmarks: FAILED

❌ Runtime Vitals Benchmarks: FAILED

📝 Note: Detailed results are available in the job logs.

🎯 Performance Budgets:

  • Build time: <70s total
  • First-load JS: <100KB gzipped
  • FCP: <1.5s, LCP: <2.5s, TTI: <3s

Updated: 2026-05-31T14:02:21.329Z

@perasperaactual perasperaactual merged commit a0e2a3c into dev May 31, 2026
14 of 15 checks passed
@perasperaactual perasperaactual deleted the fix/a11y-skip-link-tabindex-ssr-test branch May 31, 2026 14:03
@github-actions
Copy link
Copy Markdown
Contributor

♿ Accessibility Test Results

Overall Status: ✅ 0/0 tests passed

🦮 WCAG 2.1 AA Compliance

No WCAG test results available

⌨️ Keyboard Navigation

No keyboard navigation test results available


⚠️ No accessibility tests were executed. Check the workflow logs for setup issues.

📊 Detailed Report

Download the full HTML accessibility report from the workflow artifacts for:

  • Detailed WCAG violation descriptions
  • Specific element selectors and fixes
  • Color contrast issues
  • Keyboard navigation flow analysis

🔍 Testing Checklist

Our accessibility tests verify:

  • ✅ WCAG 2.1 Level AA compliance
  • ✅ Color contrast in light and dark modes
  • ✅ Tab key navigation through all interactive elements
  • ✅ Focus indicators are visible
  • ✅ No keyboard traps
  • ✅ Skip links and ARIA landmarks
  • ✅ Screen reader compatibility

Powered by @axe-core/playwright and Playwright

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.

1 participant