Skip to content

🎨 Palette: Improve accessibility of language toggle links - #58

Open
divineforge wants to merge 3 commits into
mainfrom
palette/a11y-lang-switcher-985451862002727413
Open

🎨 Palette: Improve accessibility of language toggle links#58
divineforge wants to merge 3 commits into
mainfrom
palette/a11y-lang-switcher-985451862002727413

Conversation

@divineforge

Copy link
Copy Markdown
Collaborator

💡 What: Added lang, hreflang, and data-lang to language toggle links in the header, along with a missing id="lang-toggle" on the nav container.

🎯 Why: To ensure screen readers apply the correct pronunciation profiles when reading language names (e.g. reading "日本語" using Japanese pronunciation rules rather than English), and to properly hook into the existing client-side language-toggle.js logic which expects data-lang.

Accessibility: Screen readers will now announce translated language labels using the appropriate localized voice rather than butchering the pronunciation. Added hreflang to inform user agents about the target language of the link.


PR created automatically by Jules for task 985451862002727413 started by @divineforge

Adds `lang` and `hreflang` attributes to the language switcher so screen readers use the correct pronunciation profiles. Adds `id="lang-toggle"` and `data-lang` to match existing Javascript requirements. Fixes some markdown lint issues around missing blank lines in yin/yang pages. Logged learning to `.Jules/palette.md`.

Co-authored-by: divineforge <1146195+divineforge@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploying gzen with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7c18548
Status:🚫  Build failed.

View logs

google-labs-jules Bot and others added 2 commits July 9, 2026 23:28
Adds `lang` and `hreflang` attributes to the language switcher so screen readers use the correct pronunciation profiles. Adds `id="lang-toggle"` and `data-lang` to match existing Javascript requirements. Replaced deprecated `.LanguageName` with `.Lang` which was causing Cloudflare Page build errors. Logged learning to `.Jules/palette.md`.

Co-authored-by: divineforge <1146195+divineforge@users.noreply.github.com>
Adds `lang` and `hreflang` attributes to the language switcher so screen readers use the correct pronunciation profiles. Adds `id="lang-toggle"` and `data-lang` to match existing Javascript requirements. Replaced deprecated `.LanguageName` with `.Lang` which was causing Cloudflare Page build errors. Logged learning to `.Jules/palette.md`. Fixed markdown lint issues in `observing-yin-yang.md`.

Co-authored-by: divineforge <1146195+divineforge@users.noreply.github.com>
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