Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions source/config/configSpec.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
# 0:default, 1:Only when necessary, 2:yes, 3:no
allowInChromium = integer(0, 3, default=0)

[annotations]
reportDetails = boolean(default=false)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some experimental features I advise using an integer, so that we can have 3 way selections: (new behavior, old behavior, and default). This allows us to differentiate between those who have explicitly turned off a feature, and those who have just left it as the default. I think this situation is more important if we expect the flag to be long lived, and the default behavior to change.

For annotations I think a boolean is fine, since I hope we are able to remove the option once we are happy with the behavior. A bool allows us to turn it on to test, but most users won't be bothered by a half implementation.

Just to illustrate my first point. Imagine we want to do the following:

  • Add a new feature, default to "off", behind a flag for dev purposes.
  • Later when the implementation is complete, it stays configurable, but default to "on". We want all users to give it a try, but we are aware that it won't work for everyone.

Meanwhile:

  • User A, aware of the early development, decides that feature is not for them. Chooses to disable it. We don't want to change their explicitly chosen preference.
  • User B, not aware of the feature. They should try the feature when the default is changed to "on".


[terminals]
speakPasswords = boolean(default=false)
keyboardSupportInLegacy = boolean(default=True)
Expand Down
19 changes: 19 additions & 0 deletions source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2640,6 +2640,22 @@ def __init__(self, parent):
self.UIAInChromiumCombo.SetSelection(config.conf["UIA"]["allowInChromium"])
self.UIAInChromiumCombo.defaultValue = self._getDefaultValue(["UIA", "allowInChromium"])

# Translators: This is the label for a group of advanced options in the
# Advanced settings panel
label = _("Annotations")
AnnotationsSizer = wx.StaticBoxSizer(wx.VERTICAL, self, label=label)
AnnotationsBox = AnnotationsSizer.GetStaticBox()
AnnotationsGroup = guiHelper.BoxSizerHelper(self, sizer=AnnotationsSizer)
self.bindHelpEvent("Annotations", AnnotationsBox)
sHelper.addItem(AnnotationsGroup)

# Translators: This is the label for a checkbox in the
# Advanced settings panel.
label = _("Report details in browse mode")
self.annotationsDetailsCheckBox = AnnotationsGroup.addItem(wx.CheckBox(AnnotationsBox, label=label))
self.annotationsDetailsCheckBox.SetValue(config.conf["annotations"]["reportDetails"])
self.annotationsDetailsCheckBox.defaultValue = self._getDefaultValue(["annotations", "reportDetails"])

# Translators: This is the label for a group of advanced options in the
# Advanced settings panel
label = _("Terminal programs")
Expand Down Expand Up @@ -2812,6 +2828,7 @@ def haveConfigDefaultsBeenRestored(self):
and self.diffAlgoCombo.GetSelection() == self.diffAlgoCombo.defaultValue
and self.caretMoveTimeoutSpinControl.GetValue() == self.caretMoveTimeoutSpinControl.defaultValue
and set(self.logCategoriesList.CheckedItems) == set(self.logCategoriesList.defaultCheckedItems)
and self.annotationsDetailsCheckBox.IsChecked() == self.annotationsDetailsCheckBox.defaultValue
and True # reduce noise in diff when the list is extended.
)

Expand All @@ -2827,6 +2844,7 @@ def restoreToDefaults(self):
self.keyboardSupportInLegacyCheckBox.SetValue(self.keyboardSupportInLegacyCheckBox.defaultValue)
self.diffAlgoCombo.SetSelection(self.diffAlgoCombo.defaultValue == 'auto')
self.caretMoveTimeoutSpinControl.SetValue(self.caretMoveTimeoutSpinControl.defaultValue)
self.annotationsDetailsCheckBox.SetValue(self.annotationsDetailsCheckBox.defaultValue)
self.logCategoriesList.CheckedItems = self.logCategoriesList.defaultCheckedItems
self._defaultsRestored = True

Expand All @@ -2849,6 +2867,7 @@ def onSave(self):
self.diffAlgoVals[diffAlgoChoice]
)
config.conf["editableText"]["caretMoveTimeoutMs"]=self.caretMoveTimeoutSpinControl.GetValue()
config.conf["annotations"]["reportDetails"] = self.annotationsDetailsCheckBox.IsChecked()
for index,key in enumerate(self.logCategories):
config.conf['debugLog'][key]=self.logCategoriesList.IsChecked(index)

Expand Down
8 changes: 8 additions & 0 deletions user_docs/en/userGuide.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,14 @@ The combo box has the following options:
- No: Don't use UIA, even if NVDA is unable to inject in process. This may be useful for developers debugging issues with IA2 and want to ensure that NVDA does not fall back to UIA.
-

==== Enable Experimental ARIA annotations support ====[Annotations]
Used to enable features which add experimental support for ARIA annotations.
Some of these features may be incomplete.
The following options exist:
- "Report details in browse mode": enables reporting if an object has details in browse mode.
Reporting the summary of those details can be done by adding an input gesture for <command>.
-

==== Use UI automation to access Microsoft Excel spreadsheet controls when available ====[UseUiaForExcel]
When this option is enabled, NVDA will try to use the Microsoft UI Automation accessibility API in order to fetch information from Microsoft Excel Spreadsheet controls.
This is an experimental feature, and some features of Microsoft Excel may not be available in this mode.
Expand Down