Skip to content

Commit e793d65

Browse files
authored
Merge 12edf00 into 8accbfa
2 parents 8accbfa + 12edf00 commit e793d65

File tree

4 files changed

+42
-11
lines changed

4 files changed

+42
-11
lines changed

source/NVDAHelper.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ def nvdaController_brailleMessage(text):
8383
focus=api.getFocusObject()
8484
if focus.sleepMode==focus.SLEEP_FULL:
8585
return -1
86-
import queueHandler
87-
import braille
88-
queueHandler.queueFunction(queueHandler.eventQueue,braille.handler.message,text)
86+
if config.conf["braille"]["reportLiveRegions"]:
87+
import queueHandler
88+
import braille
89+
queueHandler.queueFunction(queueHandler.eventQueue, braille.handler.message, text)
8990
return 0
9091

9192
def _lookupKeyboardLayoutNameWithHexString(layoutString):
@@ -137,6 +138,7 @@ def nvdaControllerInternal_reportLiveRegion(text: str, politeness: str):
137138
return -1
138139
import queueHandler
139140
import speech
141+
import braille
140142
from aria import AriaLivePoliteness
141143
from speech.priorities import Spri
142144
try:
@@ -156,6 +158,11 @@ def nvdaControllerInternal_reportLiveRegion(text: str, politeness: str):
156158
else Spri.NORMAL
157159
)
158160
)
161+
queueHandler.queueFunction(
162+
queueHandler.eventQueue,
163+
braille.handler.message,
164+
text
165+
)
159166
return 0
160167

161168
@WINFUNCTYPE(c_long,c_long,c_long,c_long,c_long,c_long)

source/config/configSpec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
interruptSpeechWhileScrolling = featureFlag(optionsEnum="BoolFlag", behaviorOfDefault="enabled")
8585
showSelection = featureFlag(optionsEnum="BoolFlag", behaviorOfDefault="enabled")
8686
enableHidBrailleSupport = integer(0, 2, default=0) # 0:Use default/recommended value (yes), 1:yes, 2:no
87+
reportLiveRegions = featureFlag(optionsEnum="BoolFlag", behaviorOfDefault="enabled")
8788
8889
# Braille display driver settings
8990
[[__many__]]

source/gui/settingsDialogs.py

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2860,12 +2860,11 @@ def __init__(self, parent):
28602860

28612861
# Translators: This is the label for a group of advanced options in the
28622862
# Advanced settings panel
2863-
label = _("HID Braille Standard")
2864-
hidBrailleSizer = wx.StaticBoxSizer(wx.VERTICAL, self, label=label)
2865-
hidBrailleBox = hidBrailleSizer.GetStaticBox()
2866-
hidBrailleGroup = guiHelper.BoxSizerHelper(self, sizer=hidBrailleSizer)
2867-
self.bindHelpEvent("HIDBraille", hidBrailleBox)
2868-
sHelper.addItem(hidBrailleGroup)
2863+
label = _("Braille")
2864+
brailleSizer = wx.StaticBoxSizer(wx.VERTICAL, self, label=label)
2865+
brailleBox = brailleSizer.GetStaticBox()
2866+
brailleGroup = guiHelper.BoxSizerHelper(self, sizer=brailleSizer)
2867+
sHelper.addItem(brailleGroup)
28692868

28702869
supportHidBrailleChoices = [
28712870
# Translators: Label for option in the 'Enable support for HID braille' combobox
@@ -2879,10 +2878,10 @@ def __init__(self, parent):
28792878
_("No"),
28802879
]
28812880

2882-
# Translators: This is the label for a checkbox in the
2881+
# Translators: This is the label for a combo box in the
28832882
# Advanced settings panel.
28842883
label = _("Enable support for HID braille")
2885-
self.supportHidBrailleCombo: wx.Choice = hidBrailleGroup.addLabeledControl(
2884+
self.supportHidBrailleCombo: wx.Choice = brailleGroup.addLabeledControl(
28862885
labelText=label,
28872886
wxCtrlClass=wx.Choice,
28882887
choices=supportHidBrailleChoices,
@@ -2893,6 +2892,17 @@ def __init__(self, parent):
28932892
self.supportHidBrailleCombo.defaultValue = self._getDefaultValue(
28942893
["braille", "enableHidBrailleSupport"]
28952894
)
2895+
self.bindHelpEvent("HIDBraille", self.supportHidBrailleCombo)
2896+
self.brailleLiveRegionsCombo: nvdaControls.FeatureFlagCombo = brailleGroup.addLabeledControl(
2897+
labelText=_(
2898+
# Translators: This is the label for a combo-box in the Advanced settings panel.
2899+
"Report live regions:"
2900+
),
2901+
wxCtrlClass=nvdaControls.FeatureFlagCombo,
2902+
keyPath=["braille", "reportLiveRegions"],
2903+
conf=config.conf,
2904+
)
2905+
self.bindHelpEvent("BrailleLiveRegions", self.brailleLiveRegionsCombo)
28962906

28972907
# Translators: This is the label for a group of advanced options in the
28982908
# Advanced settings panel
@@ -3194,6 +3204,7 @@ def haveConfigDefaultsBeenRestored(self):
31943204
and self.annotationsDetailsCheckBox.IsChecked() == self.annotationsDetailsCheckBox.defaultValue
31953205
and self.ariaDescCheckBox.IsChecked() == self.ariaDescCheckBox.defaultValue
31963206
and self.supportHidBrailleCombo.GetSelection() == self.supportHidBrailleCombo.defaultValue
3207+
and self.brailleLiveRegionsCombo.isValueConfigSpecDefault()
31973208
and self.keyboardSupportInLegacyCheckBox.IsChecked() == self.keyboardSupportInLegacyCheckBox.defaultValue
31983209
and self.winConsoleSpeakPasswordsCheckBox.IsChecked() == self.winConsoleSpeakPasswordsCheckBox.defaultValue
31993210
and self.diffAlgoCombo.GetSelection() == self.diffAlgoCombo.defaultValue
@@ -3222,6 +3233,7 @@ def restoreToDefaults(self):
32223233
self.annotationsDetailsCheckBox.SetValue(self.annotationsDetailsCheckBox.defaultValue)
32233234
self.ariaDescCheckBox.SetValue(self.ariaDescCheckBox.defaultValue)
32243235
self.supportHidBrailleCombo.SetSelection(self.supportHidBrailleCombo.defaultValue)
3236+
self.brailleLiveRegionsCombo.resetToConfigSpecDefault()
32253237
self.winConsoleSpeakPasswordsCheckBox.SetValue(self.winConsoleSpeakPasswordsCheckBox.defaultValue)
32263238
self.keyboardSupportInLegacyCheckBox.SetValue(self.keyboardSupportInLegacyCheckBox.defaultValue)
32273239
self.diffAlgoCombo.SetSelection(self.diffAlgoCombo.defaultValue == 'auto')
@@ -3269,6 +3281,7 @@ def onSave(self):
32693281
config.conf["annotations"]["reportDetails"] = self.annotationsDetailsCheckBox.IsChecked()
32703282
config.conf["annotations"]["reportAriaDescription"] = self.ariaDescCheckBox.IsChecked()
32713283
config.conf["braille"]["enableHidBrailleSupport"] = self.supportHidBrailleCombo.GetSelection()
3284+
self.brailleLiveRegionsCombo.saveCurrentValueToConf()
32723285
self.loadChromeVBufWhenBusyCombo.saveCurrentValueToConf()
32733286

32743287
for index,key in enumerate(self.logCategories):

user_docs/en/userGuide.t2t

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,6 +2259,16 @@ However, for basic spreadsheet navigating / editing, this option may provide a v
22592259
We still do not recommend that the majority of users turn this on by default, though we do welcome users of Microsoft Excel build 16.0.13522.10000 or higher to test this feature and provide feedback.
22602260
Microsoft Excel's UI automation implementation is ever changing, and versions of Microsoft Office older than 16.0.13522.10000 may not expose enough information for this option to be of any use.
22612261

2262+
==== Report live regions ====[BrailleLiveRegions]
2263+
: Default
2264+
Enabled
2265+
: Options
2266+
Disabled, Enabled
2267+
:
2268+
2269+
This option selects whether NVDA reports changes in some dynamic web content in Braille.
2270+
Disabling this option is equivalent to NVDA's behaviour in versions 2023.1 and earlier, which only reported these content changes in speech.
2271+
22622272
==== Speak passwords in all enhanced terminals ====[AdvancedSettingsWinConsoleSpeakPasswords]
22632273
This setting controls whether characters are spoken by [speak typed characters #KeyboardSettingsSpeakTypedCharacters] or [speak typed words #KeyboardSettingsSpeakTypedWords] in situations where the screen does not update (such as password entry) in some terminal programs, such as the Windows Console with UI automation support enabled and Mintty.
22642274
For security purposes, this setting should be left disabled.

0 commit comments

Comments
 (0)