Navigation
API > API/Plugins > API/Plugins/ScreenReader
A user of the screen reader. Corresponds to a hardware device that users use. This class is a facade that acts as a one stop shop for all screen reading services on a per user basis. Multiple screen reader users can exist simultaneoulsy to facilitate local multiplayer and users can opt in or out of receiving screen reader feedback by registering and unregistering with the screen reader respectively. A screen user is inactive by default when it is first registered through the screen reader. Users must explicitly activate the screen reader user after successful registration with the screen reader to use its services. Responsibilities of the class are:
Text to speech (TTS) requests - Users can request an announcement to be spoken via text to speech to screen reader user
Accessible focus handling - A screen reader user holds information about the accessible widget it is currently focused on
Accessible Navigation - Screen reader users have finer navigation controls around the accessible widget hierarchy as compared to regular tab navigation with keyboard or D-pad controls with a gamepad.
| Name | FScreenReaderUser |
| Type | class |
| Header File | /Engine/Plugins/Experimental/ScreenReader/Source/ScreenReader/Public/GenericPlatform/ScreenReaderUser.h |
| Include Path | #include "GenericPlatform/ScreenReaderUser.h" |
Syntax
class FScreenReaderUser : public FGenericAccessibleUser
Inheritance Hierarchy
- FGenericAccessibleUser → FScreenReaderUser
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FScreenReaderUser
(
FAccessibleUserIndex InUserIndex |
GenericPlatform/ScreenReaderUser.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FScreenReaderUser() |
GenericPlatform/ScreenReaderUser.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AnnouncementChannel | TUniquePtr< FScreenReaderAnnouncementChannel > | Responsible for handling all incoming announcement requests and speaking them via text to speech if possible | GenericPlatform/ScreenReaderUser.h | |
| bActive | bool | GenericPlatform/ScreenReaderUser.h | ||
| NavigationPolicy | TSharedRef< IScreenReaderNavigationPolicy > | GenericPlatform/ScreenReaderUser.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Activate () |
Activates the screen reader user and fulfill requests for accessibility services such as text to speech that clients can make. | GenericPlatform/ScreenReaderUser.h | |
void Deactivate() |
Deactivates the screen reader and disables all announcement and text to speech services making them do nothing. | GenericPlatform/ScreenReaderUser.h | |
float GetSpeechRate () |
Returns the speech rate text to speech is speaking at for this user. | GenericPlatform/ScreenReaderUser.h | |
float GetSpeechVolume() |
Returns the speech volume for text to speech. Value will be between 0.0f and 1.0f. | GenericPlatform/ScreenReaderUser.h | |
bool IsActive() |
Returns true if the screen reader user is active. Else returns false. | GenericPlatform/ScreenReaderUser.h | |
bool IsSpeaking() |
Returns true if an announcement is currently being spoken. Else returns false. | GenericPlatform/ScreenReaderUser.h | |
bool IsSpeechMuted() |
Returns true if the text to speech for this user is muted. Else returns false. | GenericPlatform/ScreenReaderUser.h | |
FScreenReaderReply MuteSpeech() |
Mutes the text to speech for this user so requests to speak strings will be inaudible. | GenericPlatform/ScreenReaderUser.h | |
FScreenReaderReply NavigateToFirstAncestor() |
Shifts focus to the first ancestor of the user's currently focused accessible widget based on the current navigation policy. | GenericPlatform/ScreenReaderUser.h | |
| Shifts focus to the first child from the user's currently focused accessible widget based on the current navigation policy. | GenericPlatform/ScreenReaderUser.h | ||
FScreenReaderReply NavigateToNextSibling() |
Shifts focus to the next sibling from the user's currently focused accessible widget based on the current navigation policy. | GenericPlatform/ScreenReaderUser.h | |
| Shifts focus to the logical next widget in the accessible widget hierarchy from the user's currently focused accessible widget based on the current navigation policy. | GenericPlatform/ScreenReaderUser.h | ||
FScreenReaderReply NavigateToPreviousSibling() |
Shifts focus to the previous sibling from the user's currently focused accessible widget based on the current navigation policy. | GenericPlatform/ScreenReaderUser.h | |
| Shifts focus to the logical previous widget in the accessible widget hierarchy from the user's currently focused accessible widget based on the current navigation policy. | GenericPlatform/ScreenReaderUser.h | ||
FScreenReaderReply RequestSpeak
(
FScreenReaderAnnouncement InAnnouncement |
Requests an announcement to be spoken to the screen reader user. | GenericPlatform/ScreenReaderUser.h | |
FScreenReaderReply RequestSpeakWidget
(
const TSharedRef< IAccessibleWidget >& InWidget |
Requests the information about an accessibility widget to be read out to a user. | GenericPlatform/ScreenReaderUser.h | |
void SetNavigationPolicy
(
const TSharedRef< IScreenReaderNavigationPolicy >& InNavigationPolicy |
Navigation. | GenericPlatform/ScreenReaderUser.h | |
FScreenReaderReply SetSpeechRate
(
float InRate |
Sets the speech rate text to speech will speak at for this user. | GenericPlatform/ScreenReaderUser.h | |
FScreenReaderReply SetSpeechVolume
(
float InVolume |
Sets the speech volume for text to speech to speak at. | GenericPlatform/ScreenReaderUser.h | |
| Immediately stops speaking any currently spoken announcement. | GenericPlatform/ScreenReaderUser.h | ||
FScreenReaderReply UnmuteSpeech() |
Unmutes the text to speech for this user so that requests to speak strings will be audible again. | GenericPlatform/ScreenReaderUser.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnUnregistered() |
GenericPlatform/ScreenReaderUser.h |