Section Accessibility
Accessibility functions, mostly audio messages.
Summary
Return type | Function and summary |
---|---|
boolean | IsScreenReaderActive() Is there a screen reader, a voice that assist visually impaired user? |
boolean | IsThemeSoundsActive() Are interface sounds active in scripts using SMDialog and SMMenu? |
SMAlert(string msg) Add accessibility to built-in Alert() function. | |
boolean | SMConfirmation(string msg) Add accessibility to built-in Confirmation() function. |
SMMessage(string msg) Add accessibility to built-in Message() function. | |
ScreenReader(string text) Say the text if text to speech is enable for visually impaired people (screen reader). |
Functions
IsThemeSoundsActive()
Are interface sounds active in scripts using SMDialog and SMMenu?
To set up screen reader, go to Scripts > Miscellaneous > Swiss knife menu, then Settings > Interface sounds.
- Return
- boolean:
true
if active,nil
orfalse
if not set up.
IsScreenReaderActive()
Is there a screen reader, a voice that assist visually impaired user?
The screen reader is set up by the script in Miscellaneous > Screen Reader setup. A call to ScreenReader("words to say")
wil lsay nothing if not set up, or will say the words if a human voice is choosen.
If the words need time or resource to be build, you can optimize your code by calling IsScreenReaderActive()
before this task.
To set up screen reader, go to Scripts > Miscellaneous > Swiss knife menu, then Settings > Accessibility.
- Return
- boolean:
true
if active,nil
orfalse
if not set up. - See
- ScreenReader
ScreenReader(string text)
Say the text if text to speech is enable for visually impaired people (screen reader).
Parameter | Type | Default | Description |
---|---|---|---|
text | string | text |
SMAlert(string msg)
Add accessibility to built-in Alert()
function.
Parameter | Type | Default | Description |
---|---|---|---|
msg | string | msg |
SMConfirmation(string msg)
Add accessibility to built-in Confirmation()
function.
Parameter | Type | Default | Description |
---|---|---|---|
msg | string | msg |
- Return
- boolean: The same result than
Confirmation(msg)
SMMessage(string msg)
Add accessibility to built-in Message()
function.
Parameter | Type | Default | Description |
---|---|---|---|
msg | string | msg |