Skip to content

Conversation

@joshjavier
Copy link
Contributor

Changes made

  • Added a visually hidden but focusable "Skip to main content" link as the first interactive element on the page.
  • Ensured the link anchors to the <main> element for correct navigation.
  • Enforced a single <main> element on the site for semantic correctness.
  • Introduced dynamic scroll-padding-top on the <html> element (via a custom useResizeObserver hook) so that the sticky header no longer obscures content when using the skip link.
  • Verified that the skip link becomes visible on keyboard focus and works across viewport sizes.

Preview

recording.mp4

This PR closes #354.

@joshjavier joshjavier force-pushed the feat/skip-to-main-content branch 2 times, most recently from 5829e11 to 84e304b Compare October 1, 2025 05:51
@joshjavier joshjavier force-pushed the feat/skip-to-main-content branch 2 times, most recently from 6e34bbc to b14fee5 Compare October 1, 2025 13:58
@joshjavier joshjavier requested a review from jasontorres October 1, 2025 14:12
jasontorres
jasontorres previously approved these changes Oct 1, 2025
KishonShrill
KishonShrill previously approved these changes Oct 1, 2025
@aluminyoom
Copy link
Member

hi @joshjavier, please address the merge conflicts present in your pr - it looks good and we want to get this merged in! cheers

This commit adds a "Skip to main content" link as the first interactive
element on the page. The link is initially hidden but appears at the
top-left corner of the page on focus. It's anchored to the main content
area, allowing users to skip the header navigation when tabbing through
the page.

I also ensured that the site has a single `<main>` element for proper
semantic structure.

This implementation aligns with the Accessibility Statement and WCAG 2.1
guidelines.
This commit adds a dynamic `scroll-padding-top` to the `<html>` element
based on the header height, so that when users activate the "Skip to the
main content" link, the main content is fully visible and not hidden
behind the sticky header.

I created a custom `useResizeObserver` hook and placed it in the
newly-created `src/hooks` directory to update the padding when the
header height changes, e.g., when the user resizes the viewport.
@joshjavier joshjavier force-pushed the feat/skip-to-main-content branch from 054049b to 8b6eff9 Compare October 7, 2025 03:58
@joshjavier
Copy link
Contributor Author

hi @joshjavier, please address the merge conflicts present in your pr - it looks good and we want to get this merged in! cheers

Hi @mayspc, thanks for the heads-up! I've rebased my branch on top of the latest main and resolved the merge conflicts. It should now be ready for review and merge. Let me know if there's anything else I need to do on my end.

@angelofallars angelofallars added bug Something isn't working high priority This project is needed and needs to be done fast!!! labels Oct 16, 2025
@KishonShrill
Copy link
Member

@joshjavier yahoo, I'm watching this PR now. Can you rebase your branch please. I'll check it once it is done!

@KishonShrill KishonShrill self-assigned this Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working high priority This project is needed and needs to be done fast!!!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing "Skip to main content" link (per Accessibility Statement)

5 participants