🎨 Palette: Improve accessibility of language toggle links - #58
🎨 Palette: Improve accessibility of language toggle links#58divineforge wants to merge 3 commits into
Conversation
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>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
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>
💡 What: Added
lang,hreflang, anddata-langto language toggle links in the header, along with a missingid="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.jslogic which expectsdata-lang.♿ Accessibility: Screen readers will now announce translated language labels using the appropriate localized voice rather than butchering the pronunciation. Added
hreflangto inform user agents about the target language of the link.PR created automatically by Jules for task 985451862002727413 started by @divineforge