Fixed some element types being spoken even though sound only is selected.
This commit is contained in:
1 parent
6ee0454fbe
commit
0d76e44f9a
5 files changed
+53
-6
No files matched your search
@@ -127,7 +127,10 @@ func FocusSpeechWithOptions(snapshot atspi.Snapshot, options Options) Speech {
|
||||
role = ""
|
||||
}
|
||||
_, replaceRole := roleSoundCue(snapshot, options)
|
||||
if options.RoleSoundPresentation == "sound_only" && replaceRole {
|
||||
_, replaceState := stateSoundCue(snapshot, options)
|
||||
// A control-specific state cue also identifies its role. Keep the role
|
||||
// spoken when role sounds are disabled or no replacement cue is available.
|
||||
if options.RoleSoundPresentation == "sound_only" && (replaceRole || options.PlaySoundForRole && replaceState) {
|
||||
role = ""
|
||||
}
|
||||
if options.SpeechVerbosityLevel != 0 && snapshot.ChildCountKnown && snapshot.ChildCount > 0 {
|
||||
@@ -147,7 +150,6 @@ func FocusSpeechWithOptions(snapshot atspi.Snapshot, options Options) Speech {
|
||||
}
|
||||
fields = append(fields, snapshot.Name, role)
|
||||
states := controlStates(snapshot)
|
||||
_, replaceState := stateSoundCue(snapshot, options)
|
||||
if options.RoleSoundPresentation == "sound_only" && replaceState {
|
||||
states = removeReplacedState(states)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user