Skip to content

feat: add accessibility features for pie menus and toolbar speech syn…#5592

Open
Siddharth-732 wants to merge 6 commits intosugarlabs:masterfrom
Siddharth-732:feature_v1
Open

feat: add accessibility features for pie menus and toolbar speech syn…#5592
Siddharth-732 wants to merge 6 commits intosugarlabs:masterfrom
Siddharth-732:feature_v1

Conversation

@Siddharth-732
Copy link
Contributor

fixes #5591

Summary

Add optional text-to-speech (TTS) feedback for pie-menu selections and toolbar Play/Stop actions, plus a top-right toggle to enable/disable speech. This improves accessibility for users who rely on audio confirmation.

Approach

  • Label Normalization: Cleaned up pie-menu labels (handling icons and symbols) to ensure they are announced correctly via an aria-live region.
  • Speech Synthesis: Utilized speechSynthesis to speak labels on selection when the global toggle is active.
  • UI Integration: Added a toggle button near the "Collapse" icon to control TTS globally.
  • Toolbar Enhancements: Wired Play/Stop toolbar buttons to announce their actions, respecting the user's toggle preference.

Affected Files

  • piemenus.js — Label normalization, aria-live announcements, TTS hooks, global toggle flag.
  • wheelnav.js — Triggers for announcements and TTS on menu item clicks.
  • artwork.js — Added new speaker icon SVG for the toggle button.
  • turtles.js — Toggle button implementation and top-right layout adjustments.
  • toolbar.js — Implementation for Play/Stop button speech logic.

Video Proof

Demo.mp4

Notes for Maintainers

  • Regarding the Demo Video: For some reason, the actual audio output of the instrument selection in piemenu was not captured during the recording, but the feature is fully functional.
  • Audio Coexistence: The TTS feedback works alongside the instrument sounds and does not cancel them.
  • Open to Feedback: If there are any other changes you want to suggest, I am more than happy to amend them!

Environment

  • Device type: [e.g., Desktop]
  • Operating System: [e.g., Windows 11]
  • Browser: [e.g., Chrome]
  • Version of Software/Project: current master

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 8, 2026

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Contributor

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

turtles.test.js

@Siddharth-732
Copy link
Contributor Author

@walterbender @omsuneri Please review the changes if they are helpful for the platform. Thank you

@vanshika2720
Copy link
Contributor

@Siddharth-732 See Jest cases are failing.

@github-actions
Copy link
Contributor

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

turtles.test.js

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@Siddharth-732
Copy link
Contributor Author

Jest Test is passing now, please check if it is ready to be merged

@walterbender
Copy link
Member

This is really interesting. I am not sure about the placement of the control. Maybe it belongs on the main toolbar? @pikurasa what do you think?

@Siddharth-732
Copy link
Contributor Author

@walterbender I'm glad you liked the feature, let me know about any changes you would like to have in my solution, I'll be more than happy to implement them.

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.

[Acccessibility] Pie menus lack audio feedback for visually impaired users

3 participants