Skip to content
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

♿️ fix: improve accessibility and i18n #183

Merged
merged 4 commits into from
Oct 2, 2023
Merged

Conversation

welpo
Copy link
Owner

@welpo welpo commented Oct 2, 2023

Summary

This PR addresses #182 by enhancing the accessibility, internationalisation, and overall usability of the theme. Improvements have been made in several areas including the language switcher dropdown, theme switcher, and the copy code button.

Enhancements for Internationalisation

  • Theme Switcher: Added ARIA labels and title elements to improve internationalisation support. The strings are saved in hidden HTML tags, as Zola cannot create JS files with Tera templates.
  • Language Switcher: Included ARIA labels, title attributes, and set the "lang" attribute for appropriate voice/accent in screen readers.
  • Copy Code Buttons: Incorporated ARIA labels and title tags, making them localizable.

Improvements in Accessibility

  • Theme Switcher: Converted to a toggle.
  • Language Switcher: Switched to summary/details HTML elements for better accessibility. The menu now opens on click, not hover.
  • Copy Code Buttons: Made the buttons selectable by screen readers.

UI/UX Tweaks

  • Theme Switcher and Language Switcher icons now change colour on hover to indicate interactivity.

@welpo welpo added bug Something isn't working enhancement New feature or request i18n Internationalisation labels Oct 2, 2023
@welpo welpo linked an issue Oct 2, 2023 that may be closed by this pull request
@welpo welpo merged commit 2c6ac29 into main Oct 2, 2023
@welpo welpo deleted the fix/accessibility-items branch October 2, 2023 16:08
welpo added a commit that referenced this pull request Oct 27, 2023
It no longer works on hover, but on click, as per #183.
Smtbook pushed a commit to Smtbook/zola-theme-tabi that referenced this pull request Feb 29, 2024
Smtbook pushed a commit to Smtbook/zola-theme-tabi that referenced this pull request Feb 29, 2024
It no longer works on hover, but on click, as per welpo#183.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request i18n Internationalisation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two accessibility issues for screen reader users
1 participant