feat(a11y): add skip navigation link for WCAG 2.4.1 compliance
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 26s
PR Checklist / pr-checklist (pull_request) Failing after 2m28s
Smoke Test / smoke (pull_request) Failing after 33s
Validate Config / YAML Lint (pull_request) Failing after 14s
Validate Config / JSON Validate (pull_request) Successful in 14s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 43s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Shell Script Lint (pull_request) Failing after 36s
Validate Config / Cron Syntax Check (pull_request) Successful in 7s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 11s
Validate Config / Playbook Schema Validation (pull_request) Successful in 30s
Architecture Lint / Lint Repository (pull_request) Failing after 28s
Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 26s
PR Checklist / pr-checklist (pull_request) Failing after 2m28s
Smoke Test / smoke (pull_request) Failing after 33s
Validate Config / YAML Lint (pull_request) Failing after 14s
Validate Config / JSON Validate (pull_request) Successful in 14s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 43s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Shell Script Lint (pull_request) Failing after 36s
Validate Config / Cron Syntax Check (pull_request) Successful in 7s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 11s
Validate Config / Playbook Schema Validation (pull_request) Successful in 30s
Architecture Lint / Lint Repository (pull_request) Failing after 28s
Add R5 skip navigation link template and supporting CSS to meet WCAG 2.4.1 Bypass Blocks (A).
- New template: deploy/gitea-a11y/custom/templates/custom/skip_link.tmpl
Provides a "Skip to main content" anchor as the first focusable element.
- Updated deploy/gitea-a11y/custom/public/css/a11y-fixes.css (V5):
Styles for .skip-link, visually hidden off-screen until focus.
- Updated README.md with R5 documentation and activation instructions.
- deploy-gitea-a11y.sh: include R5 in deployed fixes list.
Usage: Insert `{{template "custom/skip_link" .}}` immediately after <body> in custom/header.tmpl.
Targets #545. Part of STEP35 FREE BURN — Gitea-first a11y V1.
This commit is contained in:
@@ -9,3 +9,25 @@
|
||||
.markdown-body a:focus {
|
||||
color: #3a5518 !important;
|
||||
}
|
||||
|
||||
/* V5 (#545): Skip navigation link (WCAG 2.4.1) — visible on focus only */
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
top: -100px;
|
||||
left: 8px;
|
||||
background: #1a1a1a;
|
||||
color: #fff;
|
||||
padding: 12px 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
z-index: 9999;
|
||||
border-radius: 0 0 4px 4px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
||||
transition: top 0.2s ease-in-out, background 0.2s;
|
||||
text-decoration: none;
|
||||
}
|
||||
.skip-link:focus {
|
||||
top: 0;
|
||||
outline: 3px solid #ffcc00;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
20
deploy/gitea-a11y/custom/templates/custom/skip_link.tmpl
Normal file
20
deploy/gitea-a11y/custom/templates/custom/skip_link.tmpl
Normal file
@@ -0,0 +1,20 @@
|
||||
{{/*
|
||||
Gitea a11y fix: V1 — Skip navigation link (WCAG 2.4.1)
|
||||
|
||||
Provides a "Skip to main content" link as the first focusable element
|
||||
in the document. Screen reader and keyboard users can activate it
|
||||
to bypass repeated navigation and go straight to the main content.
|
||||
|
||||
Usage: Insert immediately after the opening <body> tag.
|
||||
Include via custom/header.tmpl:
|
||||
|
||||
{{template "custom/skip_link" .}}
|
||||
|
||||
The target should match the id of the main content region. Gitea's
|
||||
main area uses id="main" by default. If your instance uses a
|
||||
different id (e.g. "content"), adjust the href accordingly.
|
||||
|
||||
WCAG 2.4.1 Bypass Blocks — A.
|
||||
*/}}
|
||||
|
||||
<a href="#main" class="skip-link" aria-label="Skip to main content">Skip to main content</a>
|
||||
Reference in New Issue
Block a user