🎨 Palette: Add light/dark mode toggle to documentation#11
🎨 Palette: Add light/dark mode toggle to documentation#11
Conversation
This change introduces a light/dark mode toggle to the documentation site, improving accessibility and user experience for users who prefer different reading environments. - Adds `scheme: default` (light mode) alongside `scheme: slate` (dark mode). - Configures `toggle` icons using `material/brightness-7` and `material/brightness-4`. - Preserves brand colors (`primary: black`, `accent: amber`) for both schemes. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@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. |
Summary of ChangesHello @igor-holt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the accessibility and user experience of the documentation site by introducing a light/dark mode toggle. This change empowers users to select their preferred viewing theme, improving readability and accommodating diverse visual needs, rather than being restricted to a single dark mode. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds a light/dark mode toggle to the documentation, which is a great step for accessibility. However, I've found a critical accessibility issue with the new light mode: the color contrast for links is too low, failing WCAG standards. I've left a comment with details on this in mkdocs.yml. Additionally, I've suggested an improvement to the new .Jules/palette.md file to incorporate contrast checking into the team's process to prevent similar issues in the future.
| - scheme: default | ||
| primary: black | ||
| accent: amber | ||
| toggle: | ||
| icon: material/brightness-7 | ||
| name: Switch to dark mode |
There was a problem hiding this comment.
This change introduces a critical accessibility issue in light mode. The link color, defined as --color-extropic-orange (#ff6a13) in custom_css.css, has a contrast ratio of only 2.65:1 against a white background. This fails the WCAG AA requirement of 4.5:1 for normal text.
Since this pull request's goal is to improve accessibility, this color contrast regression must be addressed. While the issue is in custom_css.css, it is surfaced by enabling the light theme here. Please update the link color for the light theme to meet accessibility standards.
| @@ -0,0 +1,3 @@ | |||
| ## 2026-02-13 - [Documentation Accessibility] | |||
| **Learning:** Providing a light/dark mode toggle in technical documentation significantly improves accessibility for users with different visual preferences or needs, especially when reading long-form content. | |||
| **Action:** Always verify `mkdocs.yml` configuration to ensure dual-scheme support is enabled with clear toggle icons. | |||
There was a problem hiding this comment.
To make this action item more robust and prevent future accessibility issues like the one discovered in this PR (low contrast links in light mode), I suggest expanding it to include color contrast verification.
| **Action:** Always verify `mkdocs.yml` configuration to ensure dual-scheme support is enabled with clear toggle icons. | |
| **Action:** Always verify `mkdocs.yml` configuration to ensure dual-scheme support is enabled with clear toggle icons and that color contrast for text and interactive elements meets accessibility standards (e.g., WCAG AA) in both schemes. |
🎨 Palette: Documentation Accessibility Improvement
💡 What: Added a light/dark mode toggle to the documentation site configuration (
mkdocs.yml).🎯 Why: Previously, the documentation was locked to dark mode (
slate). This change allows users to switch between light and dark modes based on their preference and environment, improving readability and accessibility.📸 Before/After:
♿ Accessibility:
PR created automatically by Jules for task 3779802801518276903 started by @igor-holt