UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

ui

[Desktop] Native Screen Reader Support for Windows and macOS

Solution

accessibilityuguidesktopscreen readeruser experience

Unity 2022.3.x - Unity 6.3.x

Published Wed, Apr 29

Issue

 Integrating audio files for on-screen information in your game presents difficulties, especially for dynamic data like time records. Existing ScreenReader capabilities were primarily restricted to mobile platforms like Android and iOS, making it difficult to achieve native accessibility for Windows and macOS desktop deployments without third-party plugins.

Explanation

Native desktop ScreenReader support is now available through the Accessibility API. This integration allows developers to bridge dynamic UI data with operating system accessibility tools on Windows and macOS, providing a consistent experience for visually impaired users.

  1. Open the Project Settings window and navigate to the Accessibility section.
  2. Enable the ScreenReader support checkbox for the Windows or macOS build target.
  3. Attach an AccessibleName component to your Canvas elements or specific GameObject nodes to provide semantic context.
  4. Call the ScreenReader.Announce() method from your script to communicate real-time updates like high scores or game state changes.

Additional Tips

  • Ensure an EventSystem is active in the scene so the ScreenReader can correctly track focus and navigation.
  • The ScreenReader functionality on Windows utilizes the UI Automation (UIA) framework for maximum compatibility.
  • Use the AccessibleRole property to explicitly define whether an element acts as a button, slider, or static label for the ScreenReader.

TL;DR

Native ScreenReader support has been released in Unity 6.3, enabling improved accessibility and direct OS-level speech synthesis for PC deployed products.


Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.