--- title: "Accessibility" slug: "170-core-accessibility" updated: 2025-10-28T15:08:31Z published: 2025-12-09T18:02:06Z canonical: "docs.developer.comcast.com/170-core-accessibility" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.developer.comcast.com/llms.txt > Use this file to discover all available pages before exploring further. # Accessibility **Accessibility Module 1.7.0 | Core SDK** ## Usage To use the Accessibility module, you can import it into your project from the Firebolt SDK: ``` import { Accessibility } from '@firebolt-js/sdk' ``` ## Overview The `Accessibility` module provides access to the user/device settings for closed captioning and voice guidance. Apps **SHOULD** attempt to respect these settings, rather than manage and persist seprate settings, which would be different per-app. ## Methods ### audioDescriptionSettings Get the user's preferred audio description settings To get the value of `audioDescriptionSettings` call the method like this: ``` function audioDescriptionSettings(): Promise ``` Promise resolution: [AudioDescriptionSettings](/docs/170-core-accessibility#audiodescriptionsettings-1) Capabilities: | Role | Capability | | --- | --- | | uses | xrn:firebolt:capability:accessibility:audiodescriptions | #### Examples Getting the audio description settings JavaScript: ``` import { Accessibility } from '@firebolt-js/sdk' let settings = await Accessibility.audioDescriptionSettings() console.log(settings) ``` Value of `settings`: ``` { "enabled": true } ``` **JSON-RPC:** Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Accessibility.audioDescriptionSettings", "params": {} } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "enabled": true } } ``` --- To subscribe to notifications when the value changes, call the method like this: ``` function audioDescriptionSettings( callback: (value) => AudioDescriptionSettings, ): Promise ``` Promise resolution: ``` number ``` #### Examples Getting the audio description settings JavaScript: ``` import { Accessibility } from '@firebolt-js/sdk' let listenerId = await audioDescriptionSettings((value) => { console.log(value) }) console.log(listenerId) ``` Value of `settings`: ``` { "enabled": true } ``` **JSON-RPC:** Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Accessibility.onAudioDescriptionSettingsChanged", "params": { "listen": true } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "enabled": true } } ``` --- ### closedCaptions [Deprecated] This method is deprecated as of since version 0.6.0. Please use `Accessibility.closedCaptionsSettings()` as a replacement. ``` function closedCaptions(): Promise ``` --- ### closedCaptionsSettings Get the user's preferred closed-captions settings To get the value of `closedCaptionsSettings` call the method like this: ``` function closedCaptionsSettings(): Promise ``` Promise resolution: [ClosedCaptionsSettings](/docs/170-core-Accessibility-schemas#ClosedCaptionsSettings) Capabilities: | Role | Capability | | --- | --- | | uses | xrn:firebolt:capability:accessibility:closedcaptions | #### Examples Getting the closed captions settings JavaScript: ``` import { Accessibility } from '@firebolt-js/sdk' let closedCaptionsSettings = await Accessibility.closedCaptionsSettings() console.log(closedCaptionsSettings) ``` Value of `closedCaptionsSettings`: ``` { "enabled": true, "styles": { "fontFamily": "monospaced_sanserif", "fontSize": 1, "fontColor": "#ffffff", "fontEdge": "none", "fontEdgeColor": "#7F7F7F", "fontOpacity": 100, "backgroundColor": "#000000", "backgroundOpacity": 100, "textAlign": "center", "textAlignVertical": "middle", "windowColor": "white", "windowOpacity": 50 }, "preferredLanguages": [ "eng", "spa" ] } ``` **JSON-RPC:** Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Accessibility.closedCaptionsSettings", "params": {} } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "enabled": true, "styles": { "fontFamily": "monospaced_sanserif", "fontSize": 1, "fontColor": "#ffffff", "fontEdge": "none", "fontEdgeColor": "#7F7F7F", "fontOpacity": 100, "backgroundColor": "#000000", "backgroundOpacity": 100, "textAlign": "center", "textAlignVertical": "middle", "windowColor": "white", "windowOpacity": 50 }, "preferredLanguages": ["eng", "spa"] } } ``` --- To subscribe to notifications when the value changes, call the method like this: ``` function closedCaptionsSettings( callback: (value) => ClosedCaptionsSettings, ): Promise ``` Promise resolution: ``` number ``` #### Examples Getting the closed captions settings JavaScript: ``` import { Accessibility } from '@firebolt-js/sdk' let listenerId = await closedCaptionsSettings((value) => { console.log(value) }) console.log(listenerId) ``` Value of `closedCaptionsSettings`: ``` { "enabled": true, "styles": { "fontFamily": "monospaced_sanserif", "fontSize": 1, "fontColor": "#ffffff", "fontEdge": "none", "fontEdgeColor": "#7F7F7F", "fontOpacity": 100, "backgroundColor": "#000000", "backgroundOpacity": 100, "textAlign": "center", "textAlignVertical": "middle", "windowColor": "white", "windowOpacity": 50 }, "preferredLanguages": [ "eng", "spa" ] } ``` **JSON-RPC:** Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Accessibility.onClosedCaptionsSettingsChanged", "params": { "listen": true } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "enabled": true, "styles": { "fontFamily": "monospaced_sanserif", "fontSize": 1, "fontColor": "#ffffff", "fontEdge": "none", "fontEdgeColor": "#7F7F7F", "fontOpacity": 100, "backgroundColor": "#000000", "backgroundOpacity": 100, "textAlign": "center", "textAlignVertical": "middle", "windowColor": "white", "windowOpacity": 50 }, "preferredLanguages": ["eng", "spa"] } } ``` --- ### highContrastUI The user's preference for a high-contrast UI To get the value of `highContrastUI` call the method like this: ``` function highContrastUI(): Promise ``` Promise resolution: Capabilities: | Role | Capability | | --- | --- | | uses | xrn:firebolt:capability:accessibility:highcontrastui | #### Examples High-contrast UI mode is enabled JavaScript: ``` import { Accessibility } from '@firebolt-js/sdk' let highContrastUI = await Accessibility.highContrastUI() console.log(highContrastUI) ``` Value of `highContrastUI`: ``` true ``` **JSON-RPC:** Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Accessibility.highContrastUI", "params": {} } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": true } ``` --- To subscribe to notifications when the value changes, call the method like this: ``` function highContrastUI(callback: (value) => boolean): Promise ``` Promise resolution: ``` number ``` #### Examples High-contrast UI mode is enabled JavaScript: ``` import { Accessibility } from '@firebolt-js/sdk' let listenerId = await highContrastUI((value) => { console.log(value) }) console.log(listenerId) ``` Value of `highContrastUI`: ``` true ``` **JSON-RPC:** Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Accessibility.onHighContrastUIChanged", "params": { "listen": true } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": true } ``` --- ### listen To listen to a specific event pass the event name as the first parameter: ``` listen(event: string, callback: (data: any) => void): Promise ``` Parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | `event` | `string` | Yes | The event to listen for, see [Events](/docs/170-core-accessibility#events). | | *callback* | `function` | Yes | A function that will be invoked when the event occurs. | Promise resolution: | Type | Description | | --- | --- | | `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Accessibility.clear(id)` | Callback parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](/docs/170-core-accessibility#events). | To listen to all events from this module pass only a callback, without specifying an event name: ``` listen(callback: (event: string, data: any) => void): Promise ``` Parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | *callback* | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](/docs/170-core-accessibility#events). | Callback parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | `event` | `string` | Yes | The event that has occured listen for, see [Events](/docs/170-core-accessibility#events). | | `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](/docs/170-core-accessibility#events). | Promise resolution: | Type | Description | | --- | --- | | `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Accessibility.clear(id)` | See [Listening for events](/docs/listening-for-events/) for more information and examples. ### once To listen to a single instance of a specific event pass the event name as the first parameter: ``` once(event: string, callback: (data: any) => void): Promise ``` The `once` method will only pass the next instance of this event, and then dicard the listener you provided. Parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | `event` | `string` | Yes | The event to listen for, see [Events](/docs/170-core-accessibility#events). | | *callback* | `function` | Yes | A function that will be invoked when the event occurs. | Promise resolution: | Type | Description | | --- | --- | | `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Accessibility.clear(id)` | Callback parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](/docs/170-core-accessibility#events). | To listen to the next instance only of any events from this module pass only a callback, without specifying an event name: ``` once(callback: (event: string, data: any) => void): Promise ``` Parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | *callback* | `function` | Yes | A function that will be invoked when the event occurs. The event data depends on which event is firing, see [Events](/docs/170-core-accessibility#events). | Callback parameters: | Param | Type | Required | Summary | | --- | --- | --- | --- | | `event` | `string` | Yes | The event that has occured listen for, see [Events](/docs/170-core-accessibility#events). | | `data` | `any` | Yes | The event data, which depends on which event is firing, see [Events](/docs/170-core-accessibility#events). | Promise resolution: | Type | Description | | --- | --- | | `number` | Listener ID to clear the callback method and stop receiving the event, e.g. `Accessibility.clear(id)` | See [Listening for events](/docs/listening-for-events/) for more information and examples. ### voiceGuidance [Deprecated] This method is deprecated as of since version 0.6.0. Please use `Accessibility.voiceGuidanceSettings()` as a replacement. ``` function voiceGuidance(): Promise ``` --- ### voiceGuidanceSettings Get the user's preferred voice guidance settings To get the value of `voiceGuidanceSettings` call the method like this: ``` function voiceGuidanceSettings(): Promise ``` Promise resolution: [VoiceGuidanceSettings](/docs/170-core-Accessibility-schemas#VoiceGuidanceSettings) Capabilities: | Role | Capability | | --- | --- | | uses | xrn:firebolt:capability:accessibility:voiceguidance | #### Examples Getting the voice guidance settings JavaScript: ``` import { Accessibility } from '@firebolt-js/sdk' let settings = await Accessibility.voiceGuidanceSettings() console.log(settings) ``` Value of `settings`: ``` { "enabled": true, "navigationHints": true, "rate": 1 } ``` **JSON-RPC:** Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Accessibility.voiceGuidanceSettings", "params": {} } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "enabled": true, "navigationHints": true, "rate": 1 } } ``` --- To subscribe to notifications when the value changes, call the method like this: ``` function voiceGuidanceSettings( callback: (value) => VoiceGuidanceSettings, ): Promise ``` Promise resolution: ``` number ``` #### Examples Getting the voice guidance settings JavaScript: ``` import { Accessibility } from '@firebolt-js/sdk' let listenerId = await voiceGuidanceSettings((value) => { console.log(value) }) console.log(listenerId) ``` Value of `settings`: ``` { "enabled": true, "navigationHints": true, "rate": 1 } ``` **JSON-RPC:** Request: ``` { "jsonrpc": "2.0", "id": 1, "method": "Accessibility.onVoiceGuidanceSettingsChanged", "params": { "listen": true } } ``` Response: ``` { "jsonrpc": "2.0", "id": 1, "result": { "enabled": true, "navigationHints": true, "rate": 1 } } ``` --- ## Events ### audioDescriptionSettingsChanged See: [audioDescriptionSettings](/docs/170-core-accessibility#audiodescriptionsettings) ### closedCaptionsSettingsChanged See: [closedCaptionsSettings](/docs/170-core-accessibility#closedcaptionssettings) ### highContrastUIChanged See: [highContrastUI](/docs/170-core-accessibility#highcontrastui) ### voiceGuidanceSettingsChanged See: [voiceGuidanceSettings](/docs/170-core-accessibility#voiceguidancesettings) ## Private Events **View** ### audioDescriptionSettingsChanged See: [audioDescriptionSettings](/docs/170-core-accessibility#audiodescriptionsettings) ### closedCaptionsSettingsChanged See: [closedCaptionsSettings](/docs/170-core-accessibility#closedcaptionssettings) ### highContrastUIChanged See: [highContrastUI](/docs/170-core-accessibility#highcontrastui) ### voiceGuidanceSettingsChanged See: [voiceGuidanceSettings](/docs/170-core-accessibility#voiceguidancesettings) ## Types ### AudioDescriptionSettings ``` type AudioDescriptionSettings = { enabled: boolean // Whether or not audio descriptions should be enabled by default } ``` ---