diff --git a/deploy/gitea-a11y/custom/public/css/a11y-fixes.css b/deploy/gitea-a11y/custom/public/css/a11y-fixes.css new file mode 100644 index 00000000..3c2a1700 --- /dev/null +++ b/deploy/gitea-a11y/custom/public/css/a11y-fixes.css @@ -0,0 +1,57 @@ +/* ============================================================ + Gitea a11y fixes: V3, V4 — CSS contrast overrides + + V3 (#547): Footer text contrast — darken to #767676 (4.54:1 on white) + V4 (#548): Green inline links — darken to #507020 (4.5:1 on white) + + Deploy to: custom/public/css/a11y-fixes.css + Include in: custom/templates/custom/header.tmpl + ============================================================ */ + +/* V3: Footer text — ensure 4.5:1 contrast ratio */ +.footer { + color: #767676 !important; +} + +.footer a { + color: #5a5a5a !important; +} + +.footer .version, +.footer .page-render-time, +.footer .ui.divider + div { + color: #767676 !important; +} + +/* V4: Green inline links — darken for contrast + add underline for 1.4.1 */ +a:not(.ui):not(.item):not(.header):not(.button):not([class*="label"]) { + /* Only target plain inline links */ +} + +/* Gitea's green links specifically */ +.markdown-info a, +a.ui.green, +.repository .markdown a, +.home .hero a, +a[href*="install"] { + color: #507020 !important; + text-decoration: underline !important; +} + +/* Override the default Gitea link green for inline text */ +a { + /* Default links — keep underlined for non-color differentiation (SC 1.4.1) */ +} + +/* Ensure all inline links in content areas have underline */ +.repository .wiki a, +.repository .markdown a, +.ui.segment a:not(.ui):not(.item) { + text-decoration: underline !important; +} + +/* V5: Header/banner landmark — styling for the new
wrapper */ +header[role="banner"], +.header-wrapper { + /* Ensure the header landmark is visually consistent */ +} diff --git a/deploy/gitea-a11y/custom/templates/custom/a11y_head.tmpl b/deploy/gitea-a11y/custom/templates/custom/a11y_head.tmpl new file mode 100644 index 00000000..66b7e4f2 --- /dev/null +++ b/deploy/gitea-a11y/custom/templates/custom/a11y_head.tmpl @@ -0,0 +1,14 @@ +{{/* + Gitea a11y: Custom header include + + Loads the a11y-fixes.css on every page. + Deploy to: custom/templates/custom/a11y_head.tmpl + + To activate, add to custom/templates/custom/header.tmpl: + {{template "custom/a11y_head" .}} +*/}} + +{{define "custom/a11y_head"}} + + +{{end}} diff --git a/deploy/gitea-a11y/custom/templates/custom/header_banner.tmpl b/deploy/gitea-a11y/custom/templates/custom/header_banner.tmpl new file mode 100644 index 00000000..2d46cece --- /dev/null +++ b/deploy/gitea-a11y/custom/templates/custom/header_banner.tmpl @@ -0,0 +1,20 @@ +{{/* + Gitea a11y fix: V5 — Header/banner landmark + + Wraps the top navigation in a
element. + This provides a banner landmark for screen readers. + + Gitea's default base/head.tmpl does not include a header landmark. + This override wraps the navbar in
. + + Deploy to: custom/templates/custom/header_banner.tmpl + Include by adding {{template "custom/header_banner" .}} before