feat: add WCAG 2.1 AA accessibility landmarks and skip-to-content link
Some checks failed
Build & Deploy to Staging / Build & Deploy to Staging (push) Has been cancelled
Some checks failed
Build & Deploy to Staging / Build & Deploy to Staging (push) Has been cancelled
- Wrap nav in <header> landmark on all pages - Wrap content in <main id='main-content'> on all pages - Add skip-to-content link (visually hidden, visible on focus) - Add skip-link CSS styles - Add 65 accessibility tests covering all 16 full-layout pages - All 288 tests passing
This commit is contained in:
parent
e04d0bb283
commit
9fe59d4867
18 changed files with 399 additions and 2 deletions
|
|
@ -199,6 +199,9 @@ footer{border-top:1px solid var(--border);padding:48px 24px 32px;background:var(
|
|||
.footer-grid{grid-template-columns:1fr}
|
||||
.trust-badges{flex-direction:column;align-items:center;gap:12px}
|
||||
}
|
||||
|
||||
.skip-link{position:absolute;top:-100%;left:50%;transform:translateX(-50%);background:var(--primary);color:#fff;padding:12px 24px;border-radius:0 0 8px 8px;font-weight:600;font-size:.9rem;z-index:1000;transition:top .2s}
|
||||
.skip-link:focus{top:0}
|
||||
</style>
|
||||
<link rel="canonical" href="https://snapapi.eu/">
|
||||
<meta property="og:title" content="SnapAPI — Screenshot API for Developers">
|
||||
|
|
@ -234,6 +237,8 @@ footer{border-top:1px solid var(--border);padding:48px 24px 32px;background:var(
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<a href="#main-content" class="skip-link">Skip to content</a>
|
||||
<header>
|
||||
<nav>
|
||||
<div class="nav-inner">
|
||||
<a href="#" class="nav-logo">📸 <span>SnapAPI</span></a>
|
||||
|
|
@ -252,6 +257,9 @@ footer{border-top:1px solid var(--border);padding:48px 24px 32px;background:var(
|
|||
<button class="nav-mobile" onclick="document.querySelector('.nav-links').classList.toggle('show')" aria-label="Menu">☰</button>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main id="main-content">
|
||||
|
||||
<section class="hero">
|
||||
<div class="container">
|
||||
|
|
@ -719,6 +727,8 @@ screenshot = snap.<span class="fn">capture</span>(
|
|||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="footer-grid">
|
||||
<div class="footer-brand">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue