Skip to content

Add a text label to the theme dark/light mode-changing button #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
samcunliffe opened this issue May 23, 2025 · 2 comments
Closed

Add a text label to the theme dark/light mode-changing button #537

samcunliffe opened this issue May 23, 2025 · 2 comments
Labels
accessibility Something relating to the ease of accessibility (alt-text, colour choices, language, etc) enhancement New feature or request good first issue Good for newcomers task A task to be completed with the repo website Related to https://github-pages.arc.ucl.ac.uk/python-tooling

Comments

@samcunliffe
Copy link
Member

samcunliffe commented May 23, 2025

See parent issue for explanation in James' email.

Definition of done

The mode-changing button has an alt-text or meaningful label: It doesn't say "moon" (or "sun") when read by a screen reader.

Docs

Solution could be an aria-label.

@samcunliffe samcunliffe added enhancement New feature or request good first issue Good for newcomers website Related to https://github-pages.arc.ucl.ac.uk/python-tooling task A task to be completed with the repo accessibility Something relating to the ease of accessibility (alt-text, colour choices, language, etc) labels May 23, 2025
@samcunliffe samcunliffe changed the title add a text label to the mode-changing button Add a text label to the theme dark/light mode-changing button May 23, 2025
samcunliffe added a commit that referenced this issue Jun 5, 2025
Fixes 
- #537 

as suggested by @jamesprime by adding an [aria
label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label)
to labelless button. Confirmed with macOS's "VoiceOver" screen reader...

![Screenshot 2025-06-03 at 13 25
10](https://github.com/user-attachments/assets/93c86456-feca-4ff4-91d4-4b8c4afd5797)

---

As with the ☼ / ☾ it's a bit WET because it needs declaring and then the
same lines appear in the switch conditional.
@samcunliffe
Copy link
Member Author

Huh. Should have been auto-closed. Probably I didn't use the correct word.
Solved via #543.

@paddyroddy
Copy link
Member

Huh. Should have been auto-closed. Probably I didn't use the correct word. Solved via #543.

You had Fixes

  • #num

I think you have to do Fixes #num

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Something relating to the ease of accessibility (alt-text, colour choices, language, etc) enhancement New feature or request good first issue Good for newcomers task A task to be completed with the repo website Related to https://github-pages.arc.ucl.ac.uk/python-tooling
Projects
None yet
Development

No branches or pull requests

2 participants