Core Accessibility Features in Titan SDK
Titan SDK provides core tools for enhancing accessibility: Text-to-Speech (TTS) and Text Magnification (TM). These features are integrated into the SDK for consistent behavior across supported devices, including Philips 2025 and JVC 2025 TV models. Implementing these features turns your application in complying with the European Accessibility Act (EAA) requirements.Getting Started: Quick Implementations
This section provides practical steps and code snippets to begin integrating accessibility features into your TitanOS application.Basic TTS and TM Setup
Before using TTS or TM, it’s essential to check if the feature is supported by the device and if the user has enabled it in the TV’s operating system settings. ThegetTTSSettings()
function (and getTMSettings()
) will return an enabled
property indicating the user’s preference in the TV’s home screen settings.
- Checking Support & User Settings:
Direct Text-to-Speech Control
The Titan SDK’sstartSpeaking()
function provides direct control over the TV’s speech output. It does not automatically read content from your DOM elements or ARIA attributes. As the developer, you are responsible for extracting the specific text you wish to be spoken and passing it as a string (or an array of strings) to this function.
For example, you might extract text from a focused element’s textContent
, innerText
, or its aria-label
attribute.
-
Initiating Speech:
Your GitHub examples provide more complete implementations:
- Example: Text-to-Speech: Basic demonstration of calling
startSpeaking
. - Example: Text-to-Speech with Navigation: Shows extracting text from
aria-label
and using it with navigation.
- Example: Text-to-Speech: Basic demonstration of calling
-
Stopping Speech:
Enabling/Disabling the Accessibility Reader
The Accessibility Reader can automatically announce focused elements, but its lifecycle (when it’s active) needs to be explicitly managed by your application.- Managing Reader Lifecycle:
Responding to User Preferences
Users can enable or disable accessibility features from the TitanOS home screen settings. Your application should listen for these changes and adapt its behavior accordingly.- Monitoring Accessibility Settings:
Testing Your Accessible App
Thorough testing is vital to ensure your app is truly accessible.- Manual Testing with Remote Control:
- Navigate your entire application using only the TV remote’s D-Pad (directional buttons) and the OK/Enter button.
- Ensure every interactive element (buttons, links, inputs) is reachable and highlightable.
- Verify that when the Accessibility Reader is enabled, all relevant elements are announced correctly as focus moves.
- Test dynamic content updates (e.g., loading messages, form errors) to ensure they are spoken.
- Live Testing on TV:
- Test directly on Philips 2025 and JVC 2025 TV models with Accessibility settings (TTS, Text Magnification) enabled/disabled via the OS home screen. This provides the most accurate user experience.
Real-World Examples & Resources
To see these features in action and understand more about the integration, explore these examples on GitHub:- Example: Text-to-Speech: A fundamental example of using
startSpeaking
. - Example: Text-to-Speech with text content: Shows TTS with a text extracted from the text content.
- Example: Text-to-Speech with Navigation: A fake carousel of movies with TTS speaking the values from the ‘aria-label’.
- Example: Text Magnification: Applies text magnification to labels`.