Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
28e3885
Implement contrast tokens, skip link, accessible nav button, focus st…
Sagar-6203620715 Jan 19, 2026
6c41056
Normalize heading hierarchy, reduce to one h1, fix footer heading lev…
Sagar-6203620715 Jan 19, 2026
8bd7d51
Fix decorative image alt text, normalize social icon labels, and remo…
Sagar-6203620715 Jan 19, 2026
714ddd6
Add semantic landmarks, sectioning elements, navigation ARIA labels, …
Sagar-6203620715 Jan 19, 2026
ceb0572
Fix skip link focus visibility and remove nav header wrapper to impro…
Sagar-6203620715 Jan 19, 2026
b044e09
Fix footer link contrast by replacing text-red-500 with text-red-700 …
Sagar-6203620715 Jan 19, 2026
85f0729
Fix footer link contrast and remove nav header wrapper to improve acc…
Sagar-6203620715 Jan 19, 2026
f37b3a8
Fix footer link contrast, remove nav wrapper, add hero heading ID, an…
Sagar-6203620715 Jan 19, 2026
a31e822
Optimize footer headings to h2, convert mobile menu to button element…
Sagar-6203620715 Jan 19, 2026
d2d9fd5
Merge hero dual h1s into single h1, optimize footer headings to h2, c…
Sagar-6203620715 Jan 19, 2026
a2d6c52
Add explicit contrast styling to LF Projects link for consistent foot…
Sagar-6203620715 Jan 19, 2026
76464eb
Merge fix-ossf-2 with conflict resolution
Sagar-6203620715 Jan 19, 2026
f6ae686
Merge fix-ossf-3 with conflict resolution
Sagar-6203620715 Jan 19, 2026
6d174ac
Merge fix-ossf-4 with conflict resolution
Sagar-6203620715 Jan 19, 2026
5225f2a
fix(git commit --amend
Sagar-6203620715 Jan 19, 2026
51925b2
fix(a11y): Improve contrast for white text on red backgrounds
Sagar-6203620715 Jan 19, 2026
12b62f1
fix(a11y): Ensure feature card text meets WCAG contrast requirements
Sagar-6203620715 Jan 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 110 additions & 3 deletions assets/css/style.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
/* Custom styling goes here, if not in the tailwind.config.js theme */

/* Accessible Color System - WCAG 2.1 AA Compliant */
:root {
/* Text Colors */
--color-text-primary: #1F2937; /* gray-800, 12.46:1 on white */
--color-text-body: #374151; /* gray-700, 8.59:1 on white */
--color-nav-text: #111827; /* gray-900, 15.3:1 on white */

/* Link Colors */
--color-link: #B91C1C; /* red-700, 5.74:1 on white */
--color-link-hover: #991B1B; /* red-800, 7.56:1 on white */
--color-link-footer: #DC2626; /* red-600, 4.53:1 on white */

/* Background Colors */
--color-accent-red: #B91C1C; /* red-700, ensures 5.74:1 contrast with white */
--color-accent-red-dark: #B91C1C; /* red-700, darker variant */

/* Focus Indicators */
--color-focus-ring: #2563EB; /* blue-600, 4.58:1 on white */

/* Footer */
--color-footer-bg: #F9FAFB; /* gray-50, light background option */
--color-footer-text: #1F2937; /* gray-800, high contrast */
}

.space-x-20 {
margin-left: 5rem;
}
Expand All @@ -17,7 +41,7 @@
}

.medium-gray {
color: #ACADBE;
color: var(--color-nav-text, #111827);
}

.cnp-blue {
Expand All @@ -33,15 +57,32 @@
}

a {
color: #E63054;
color: var(--color-link, #B91C1C);
text-decoration: none;
}

a:hover,
a:focus {
color: var(--color-link-hover, #991B1B);
text-decoration: underline;
}

/* Footer-specific links (if needed) */
footer a {
color: var(--color-link-footer, #DC2626);
}

footer a:hover,
footer a:focus {
color: var(--color-link-hover, #991B1B);
}

.red-1 {
color: #E63054;
}

.bg-red-1 {
background: #E63054;
background: var(--color-accent-red, #B91C1C);
}

.red-2 {
Expand Down Expand Up @@ -264,6 +305,45 @@ pre {
padding: 16px;
}

/* Accessible Focus Indicators */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
outline: 3px solid var(--color-focus-ring, #2563EB);
outline-offset: 2px;
border-radius: 2px;
}

/* Only remove outlines for non-keyboard focus */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
outline: none;
}

/* Skip Link - Hidden until focused */
.skip-link {
position: absolute;
top: -40px;
left: 0;
padding: 8px 16px;
background-color: var(--color-focus-ring, #2563EB);
color: #ffffff;
font-weight: 600;
text-decoration: none;
z-index: 1000;
border-radius: 0 0 4px 0;
transition: top 0.2s ease-in-out;
}

.skip-link:focus-visible {
top: 0;
outline: 3px solid #ffffff;
outline-offset: 2px;
}

hr {
margin-top: 1em;
margin-bottom: 1em;
Expand Down Expand Up @@ -371,4 +451,31 @@ pre {
max-width: 400px;
max-height: 300px;
display: inline-block;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}

/* Make .sr-only elements visible when focused */
.sr-only:focus,
.sr-only:active {
position: static;
width: auto;
height: auto;
padding: 0.5rem 1rem;
margin: 0;
overflow: visible;
clip: auto;
white-space: normal;
border-width: initial;
}
13 changes: 13 additions & 0 deletions impl-fix-ossf-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Implementation Notes: fix-ossf-1 (Phase 1)

Scope: Critical contrast fixes, accessible focus/skip link, and keyboard/ARIA improvements for nav CTA/menu.

Changes
- Added WCAG AA color tokens and updated `.bg-red-1`, nav text, and link colors to meet ≥4.5:1 contrast.
- Implemented global `:focus-visible` outlines and styled skip link; added skip link + `<main id="main-content">`.
- Converted mobile menu trigger to a keyboard/ARIA-compliant `<button>` with `aria-expanded` toggle + Escape close; improved logo alts/labels.
- Updated footer links to darker reds for contrast; minor hero CTA hover state.

Verification
- Contrast targets align with prescribed token values (`#DC2626` bg + white text, nav `#111827`, links `#B91C1C/#991B1B`).
- Keyboard: skip link focusable; menu button toggles `aria-expanded`, closes on Escape; focus rings visible.
2 changes: 1 addition & 1 deletion layouts/_partials/card.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="w-full md:py-4 md:px-20 px-4 py-1">
<h2 class="md:text-3xl md:py-4 font-medium text-2xl py-1 md:text-left text-center">{{.Title}}</h2>
<div class="md:text-xl text-lg">{{ .Content }}</div>
<div class="md:text-xl text-lg font-semibold">{{ .Content }}</div>
</div>
34 changes: 17 additions & 17 deletions layouts/_partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,43 @@

<!-- Learn -->
<div class="px-4">
<h3 class="text-3xl font-semibold mb-0">Learn</h3>
<div class="space-y-2 text-base text-red-500">
<div><a href="/docs" class="hover:text-red-700 transition">Documentation</a></div>
<h2 class="text-3xl font-semibold mb-0">Learn</h2>
<div class="space-y-2 text-base text-gray-800">
<div><a href="/docs" class="text-red-700 hover:text-red-800 hover:underline transition">Documentation</a></div>
<div><a href="https://cloudnative-pg.io/docs/devel/quickstart/"
class="hover:text-red-600 transition">Quickstart Guide</a></div>
<div><a href="/tags/tutorial" class="hover:text-red-600 transition">Tutorials</a></div>
class="text-red-700 hover:text-red-800 hover:underline transition">Quickstart Guide</a></div>
<div><a href="/tags/tutorial" class="text-red-700 hover:text-red-800 hover:underline transition">Tutorials</a></div>
</div>
</div>

<!-- Community -->
<div class="px-4">
<h3 class="text-3xl font-semibold mb-0">Community</h3>
<div class="space-y-2 text-base text-red-500">
<div><a href="/blog" class="hover:text-red-700 transition">Blog</a></div>
<div><a href="/releases" class="hover:text-red-600 transition">Releases</a></div>
<h2 class="text-3xl font-semibold mb-0">Community</h2>
<div class="space-y-2 text-base text-gray-800">
<div><a href="/blog" class="text-red-700 hover:text-red-800 hover:underline transition">Blog</a></div>
<div><a href="/releases" class="text-red-700 hover:text-red-800 hover:underline transition">Releases</a></div>
<div><a href="https://github.com/cloudnative-pg/cloudnative-pg/blob/main/CONTRIBUTING.md"
class="hover:text-red-600 transition">How to Contribute</a></div>
class="text-red-700 hover:text-red-800 hover:underline transition">How to Contribute</a></div>
</div>
</div>

<!-- Logo + Social -->
<div class="flex flex-col items-center px-4">
<a href="https://cloudnative-pg.io/">
<img src="/logo/large_logo.svg" alt="CloudNativePG Logo" class="mb-2">
<a href="https://cloudnative-pg.io/" aria-label="CloudNativePG home">
<img src="/logo/large_logo.svg" alt="CloudNativePG" class="mb-2">
</a>
<div class="flex space-x-4 mb-2">
<a href="https://cloud-native.slack.com/archives/C08MAUJ7NPM">
<img src="/icons/Slack.svg" alt="Slack" title="Join our Slack channel now!">
</a>
<a href="https://x.com/CloudNativePg">
<img src="/icons/x.svg" alt="x" style="width:28px; height:43px;">
<img src="/icons/x.svg" alt="X" style="width:28px; height:43px;">
</a>
<a href="https://www.youtube.com/channel/UCTGH88W1BiuRRPTzJUDPJyA">
<img src="/icons/YouTube.svg" alt="YouTube">
</a>
<a href="https://www.linkedin.com/company/cloudnative-pg">
<img src="/icons/linkedin.svg" alt="linkedin" style="width:25px; height:43px;">
<img src="/icons/linkedin.svg" alt="LinkedIn" style="width:25px; height:43px;">
</a>
<a href="https://mastodon.social/@CloudNativePG" class="px-1">
<img src="/icons/mastodon.svg" alt="Mastodon">
Expand All @@ -64,10 +64,10 @@ <h3 class="text-3xl font-semibold mb-0">Community</h3>
<p class="text-sm charcoal md:w-1/2 mx-auto md:pt-10 px-6 pt-12">
Copyright &copy; CloudNativePG a Series of LF Projects, LLC.<br>
For website terms of use, trademark policy and other project policies please see
<a href="https://lfprojects.org/policies/">LF Projects, LLC Policies</a>.<br><br>
<a href="https://www.linuxfoundation.org/trademark-usage/" class="red-1">The Linux Foundation has registered
<a href="https://lfprojects.org/policies/" class="text-red-700 hover:text-red-800 hover:underline transition">LF Projects, LLC Policies</a>.<br><br>
<a href="https://www.linuxfoundation.org/trademark-usage/" class="text-red-700 hover:text-red-800 hover:underline transition">The Linux Foundation has registered
trademarks and uses trademarks</a>.<br><br>
<a href="https://www.postgresql.org/about/policies/trademarks" class="red-1">Postgres, PostgreSQL and the Slonik
<a href="https://www.postgresql.org/about/policies/trademarks" class="text-red-700 hover:text-red-800 hover:underline transition">Postgres, PostgreSQL and the Slonik
Logo are trademarks or
registered trademarks of the PostgreSQL Community Association of Canada, and
used with their permission</a>.
Expand Down
13 changes: 8 additions & 5 deletions layouts/_partials/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@
<div class="py-16">
<div class="md:flex md:flex-row px-4 md:px-56 md:justify-between place-content-center">
<div class="md:w-1/2">
<h1 class="md:text-6xl font-bold cnp-blue text-3xl md:text-left text-center">{{.Title}}</h1>
<h1 class="md:text-6xl font-bold red-1 pt-2.5 text-3xl md:text-left text-center">{{.Params.subtitle}}</h1>
<h1 id="hero-heading" class="md:text-6xl font-bold text-3xl md:text-left text-center">
<span class="cnp-blue">{{.Title}}</span>
<span class="red-1 pt-2.5 block md:inline">{{.Params.subtitle}}</span>
</h1>
<p class=" gray-4 text-xl md:text-2xl font-light leading-10 py-5 container md:tracking-wider">
{{ .Content | plainify }}
</p>
<div class="pt-7 md:text-left text-center">
<a href="{{.Params.cta.url}}"
class="md:text-3xl bg-red-1 py-4 px-12 rounded-full text-white text-xl">{{.Params.cta.content| plainify}}</a>
class="md:text-3xl bg-red-1 py-4 px-12 rounded-full text-white text-xl hover:bg-red-700 transition">{{.Params.cta.content|
plainify}}</a>
</div>
</div>
<div class="md:ml-8 hidden md:block">
{{ $image := resources.Get "images/hero_image.svg" }}
<img src="{{ $image.RelPermalink }}" alt="hero image" class="mx-auto">
<img src="{{ $image.RelPermalink }}" alt="" aria-hidden="true" class="mx-auto">
</div>
</div>
</div>
</section>
</section>
12 changes: 6 additions & 6 deletions layouts/_partials/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<div class="w-full bg-gray-1 py-16 md:px-56 px-4">
<section class="container mx-auto text-left md:flex md:flex-row md:justify-between">
<div class="md:block mx-auto my-auto hidden">
<img src="{{ .context.Params.icon }}" alt="{{.context.Title}}" />
<img src="{{ .context.Params.icon }}" alt="" aria-hidden="true" />
</div>
<div class="mx-auto my-auto md:hidden">
<img src="{{ .context.Params.icon }}" alt="{{.context.Title}}" class="h-20 mx-auto" />
<img src="{{ .context.Params.icon }}" alt="" aria-hidden="true" class="h-20 mx-auto" />
</div>
<div class="md:w-3/5 md:block">
<h2 class="md:text-3xl py-4 font-medium cnp-blue text-2xl md:text-left text-center">{{ .context.Title }}</h2>
Expand All @@ -22,17 +22,17 @@ <h2 class="md:text-3xl py-4 font-medium cnp-blue text-2xl">{{ .context.Title }}<
<div class="md:text-xl leading-8 gray-4 text-lg">{{ .context.Content }}</div>
</div>
<div class="items-center my-auto mx-auto">
<img src="{{ .context.Params.icon }}" alt="{{.context.Title}}" class="mx-auto" />
<img src="{{ .context.Params.icon }}" alt="" aria-hidden="true" class="mx-auto" />
</div>
</section>
</div>
<div class="md:hidden w-full bg-white py-16 px-4">
<div class="md:hidden w-full bg-white py-16 px-4" aria-hidden="true">
<section class="container text-left md:flex md:flex-row md:justify-between">
<div class="mx-auto my-auto ">
<img src="{{ .context.Params.icon }}" alt="{{.context.Title}}" class="h-20 mx-auto" />
<img src="{{ .context.Params.icon }}" alt="" aria-hidden="true" class="h-20 mx-auto" />
</div>
<div class="md:w-3/5">
<h2 class="md:text-3xl py-4 font-medium text-center cnp-blue text-2xl">{{ .context.Title }}</h2>
<div class="md:text-3xl py-4 font-medium text-center cnp-blue text-2xl">{{ .context.Title }}</div>
<div class="md:text-xl leading-8 gray-4 text-lg">{{ .context.Content }}</div>
</div>
</section>
Expand Down
40 changes: 24 additions & 16 deletions layouts/_partials/nav.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
<!--Navbar starts here-->
<nav>
<header>
<nav aria-label="Main navigation">
<div class="md:flex md:flex-row md:px-16 md:justify-between py-5 items-center">
<div class="flex justify-between px-4 md:hidden">
<div class="flex justify-between px-4 md:px-0 w-full md:w-auto">
<div>
{{ $image := resources.Get "logo/large_logo.svg" }}
<a href="/"><img src="/logo/large_logo.svg" class="md:h-14 h-9" alt="Cloud Native Postgres Logo"></a>
<a href="/" aria-label="CloudNativePG home" class="flex items-center">
<img src="/logo/large_logo.svg" class="h-9 md:h-14" alt="CloudNativePG">
</a>
</div>
<div class="h-6 my-auto" id="toggle-button">
<button class="h-6 my-auto bg-transparent border-none p-2 text-gray-900 hover:text-red-700 focus-visible:outline-blue-600 md:hidden"
id="toggle-button" type="button" aria-expanded="false" aria-controls="navi-list"
aria-label="Toggle navigation menu">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"
stroke-width="2">
stroke-width="2" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</div>
</div>
<div class="md:block hidden">
{{ $image := resources.Get "logo/large_logo.svg" }}
<a href="/"><img src="/logo/large_logo.svg" class="h-14" alt="Cloud Native Postgres Logo"></a>
</button>
</div>

<div class="hidden md:block px-4">
<ul class="md:flex gap-10 text-2xl medium-gray my-5 pb-0">
<ul class="md:flex gap-10 text-2xl text-gray-900 my-5 pb-0">
<li><a href="/blog">Blog</a></li>
<li><a href="/tags/tutorial">Tutorials</a></li>
<li><a href="/releases">Releases</a></li>
Expand All @@ -41,13 +40,13 @@
</ul>
<div class="flex gap-3 py-4 justify-center bg-gray-1 fill-cnp-blue">
<a href="https://github.com/cloudnative-pg/cloudnative-pg">
<img src="/icons/Git.svg" alt="Github">
<img src="/icons/Git.svg" alt="GitHub">
</a>
<a href="https://cloud-native.slack.com/archives/C08MAUJ7NPM">
<img src="/icons/Slack.svg" alt="Slack">
</a>
<a href="https://x.com/CloudNativePg">
<img src="/icons/x.svg" alt="x" style="width:28px; height:43px;">
<img src="/icons/x.svg" alt="X" style="width:28px; height:43px;">
</a>
<a href="https://www.youtube.com/channel/UCTGH88W1BiuRRPTzJUDPJyA">
<img src="/icons/YouTube.svg" alt="YouTube">
Expand All @@ -62,13 +61,22 @@
aria-label="Star cloudnative-pg/cloudnative-pg on GitHub">Star</a>
</div>
</div>
</header>
</nav>
<script>
const toggleButton = document.getElementById('toggle-button')
const naviList = document.getElementById('navi-list')

toggleButton.addEventListener('click', () => {
const isExpanded = toggleButton.getAttribute('aria-expanded') === 'true'
toggleButton.setAttribute('aria-expanded', String(!isExpanded))
naviList.classList.toggle('hidden');
})
</script>

document.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && toggleButton.getAttribute('aria-expanded') === 'true') {
toggleButton.setAttribute('aria-expanded', 'false')
naviList.classList.add('hidden')
toggleButton.focus()
}
})
</script>
Loading