Skip to content

Enhance accessibility with structured tags#16

Merged
rdhar merged 5 commits intomainfrom
enhance-accessibility-with-structured-tags
Apr 12, 2026
Merged

Enhance accessibility with structured tags#16
rdhar merged 5 commits intomainfrom
enhance-accessibility-with-structured-tags

Conversation

@rdhar
Copy link
Copy Markdown
Member

@rdhar rdhar commented Apr 12, 2026

This pull request introduces accessibility and SEO improvements to the site's core layout and metadata handling.

Accessibility improvements:

  • Added a "Skip to content" link in Header.astro, hidden via clip-path and revealed on :focus-visible to avoid flash-of-visible-content on page load.
  • Fixed skip link focus management: added id="main-content" and tabindex="-1" to <main> in BlogPost.astro, pages/index.astro, and pages/blog/index.astro so keyboard focus is correctly moved into the content area when the link is activated (not just scrolled).
  • Added aria-label="Primary" to the <nav> element for improved landmark semantics.

SEO and metadata improvements:

  • Aligned og:url with the canonical URL (built from Astro.site + pathname) instead of Astro.url, preventing mismatches from query params or preview hostnames.
  • Restored Twitter card meta tags (twitter:card, twitter:title, twitter:description, twitter:image) alongside OpenGraph to ensure rich link previews on Twitter/X, which does not always fall back to OG tags reliably.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95d4d60c02

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/Header.astro Outdated
Comment thread src/components/Header.astro Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves site accessibility and SEO by adding a keyboard “Skip to content” affordance, strengthening semantic navigation markup, and simplifying shared head metadata generation via BaseHead.astro.

Changes:

  • Added a “Skip to content” link in the global header and labeled the primary navigation.
  • Added id="main-content" to main content containers to support skip-link targeting.
  • Refactored BaseHead.astro to reduce/organize core meta tags and OpenGraph output.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/pages/index.astro Adds id="main-content" to the home page <main> for skip-link support.
src/pages/blog/index.astro Adds id="main-content" to the blog index <main> for skip-link support.
src/layouts/BlogPost.astro Adds id="main-content" to the blog post layout <main> for skip-link support.
src/components/Header.astro Introduces a skip link and adds aria-label to the primary <nav>.
src/components/BaseHead.astro Reorders/consolidates head tags and OpenGraph metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pages/index.astro Outdated
Comment thread src/pages/blog/index.astro Outdated
Comment thread src/layouts/BlogPost.astro Outdated
Comment thread src/components/Header.astro
Comment thread src/components/BaseHead.astro Outdated
Comment thread src/components/BaseHead.astro
@rdhar rdhar added this pull request to the merge queue Apr 12, 2026
Merged via the queue into main with commit 6b95fd4 Apr 12, 2026
4 checks passed
@rdhar rdhar deleted the enhance-accessibility-with-structured-tags branch April 12, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants