Skip to content

fix(i18n): SEO/a11y follow-ups from PR #16 review - #17

Open
diecoscai wants to merge 1 commit into
mainfrom
feature/i18n-seo-followups
Open

fix(i18n): SEO/a11y follow-ups from PR #16 review#17
diecoscai wants to merge 1 commit into
mainfrom
feature/i18n-seo-followups

Conversation

@diecoscai

Copy link
Copy Markdown
Owner

Summary

  • og:locale + og:locale:alternate per locale: en_US/es_ES on /, swapped on /es/
  • hreflang + lang attributes on all four EN/ES toggle anchors (corner group + mobile menu row)
  • Corner controls group labeled: role="group" + localized aria-label ("Language and theme" / "Idioma y tema") via the typed i18n dictionary
  • Fix: duplicate language toggles in the 640–767px band — the mobile-menu language row is now sm:hidden; the corner EN/ES pair (visible from sm:) is the single toggle there, and below 640px the menu row remains the only one

Context

These are the technical items deferred from the PR #16 reviews. The ES copy-phrasing items from the same list are intentionally left out — they belong to the upcoming copy-rewrite session.

Changes

File Change
src/layouts/Base.astro og:locale + og:locale:alternate meta, keyed off locale
src/components/CornerControls.astro role="group" + localized aria-label; hreflang/lang on EN/ES anchors
src/components/Nav.astro hreflang/lang on menu-row anchors; row hidden from sm: up
src/i18n/index.ts New typed corner.group UI string (EN + ES)

Verification

  • astro check: 0 errors · astro build: 2 pages
  • Playwright against the production build: localized aria-label on both locales, hreflang/lang present on all 4 anchors, og:locale correct per page; at 700px the open menu shows no language row while the corner pair shows; at 375px the menu row shows
  • Fresh-context verifier agent: PASS on all checks

Evidence screenshots in comment below.

Test plan

  • npx astro check — 0 errors
  • npm run build — 2 pages built
  • Playwright checks listed under Verification (production build, both locales, 1440/700/375px)
  • Manual: visual pass on the Vercel preview deploy

Related: #16

🤖 Generated with Claude Code

https://claude.ai/code/session_01VhYGxeedwYvmSNJFBkxwMK

… group

Deferred items from PR #16 review:
- og:locale + og:locale:alternate per locale (en_US/es_ES)
- hreflang + lang attributes on all four EN/ES toggle anchors
- role=group + localized aria-label on the corner controls container
- Hide the mobile-menu language row from sm: up — the corner EN/ES pair
  already shows there, so the 640-767px band no longer offers two toggles

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VhYGxeedwYvmSNJFBkxwMK
@diecoscai diecoscai self-assigned this Jul 11, 2026
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
portfolio Ready Ready Preview, Comment Jul 11, 2026 5:18pm

@diecoscai

Copy link
Copy Markdown
Owner Author

Evidence

Captured with Playwright against the production build (astro build + astro preview). Not screenshot-provable, asserted programmatically on both locales: role="group" with localized aria-label ("Language and theme" / "Idioma y tema"), hreflang/lang on all four toggle anchors, and og:locale/og:locale:alternate (en_USes_ES).

Screenshots

Desktop / (dark, default) — corner group unchanged, baseline intact Desktop / (light) — after theme flip, attributes present in both themes
/es/ — ES pill active, aria-label="Idioma y tema", og:locale=es_ES 700px band, menu open (the fix) — corner shows EN·ES, menu shows NO language row
Mobile 375px / — corner keeps theme toggle only Mobile 375px, menu open — EN/ES row still present below sm

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.

1 participant