Date
1 - 3 of 3
Can't get config panel intro text spoken by default
Luke Davis
Hello
I am trying to place some options in a configuration panel of NVDA, and have some introductory text spoken before the first option.
If you open NVDA preferences, settings, move down to the Object Presentation category, and press tab, NVDA speaks a description of the panel you are entering:
"""
Configure how much information NVDA will present about controls. These options apply to focus reporting and NVDA object navigation, but not when reading text content e.g. web content with browse mode.
"""
That text comes from the block between lines 1940 and 2074, of NVDA source file source/settingsDialogs.py.
However, if I create intro text in the same way using a settings panel, upon tabbing from my new settings category into the panel itself, my text is not spoken, only the first option is.
Object navigation shows it as the next left sibling, just as it shows for Object Presentation panel's text above.
Code stub:
import gui
from gui.settingsDialogs import PANEL_DESCRIPTION_WIDTH
class TestSettings(gui.settingsDialogs.SettingsPanel):
title = "Panel title"
def makeSettings(self, settingsSizer):
helper = gui.guiHelper.BoxSizerHelper(self, sizer=settingsSizer)
intro = "Text that should be spoken on tabbing into panel."
introItem = helper.addItem(wx.StaticText(self, label=intro))
introItem.Wrap(self.scaleSize(PANEL_DESCRIPTION_WIDTH))
self.cb = helper.addItem(wx.CheckBox(self, label="stuff on/off"))
self.cb.Value = False
# End
Obviously, I know there should be translation features, and the names are ill-advised. This is just for demonstration purposes.
Does anyone know what I'm missing that makes similar code work in gui.settingsPanels, but not work here?
Luke
I am trying to place some options in a configuration panel of NVDA, and have some introductory text spoken before the first option.
If you open NVDA preferences, settings, move down to the Object Presentation category, and press tab, NVDA speaks a description of the panel you are entering:
"""
Configure how much information NVDA will present about controls. These options apply to focus reporting and NVDA object navigation, but not when reading text content e.g. web content with browse mode.
"""
That text comes from the block between lines 1940 and 2074, of NVDA source file source/settingsDialogs.py.
However, if I create intro text in the same way using a settings panel, upon tabbing from my new settings category into the panel itself, my text is not spoken, only the first option is.
Object navigation shows it as the next left sibling, just as it shows for Object Presentation panel's text above.
Code stub:
import gui
from gui.settingsDialogs import PANEL_DESCRIPTION_WIDTH
class TestSettings(gui.settingsDialogs.SettingsPanel):
title = "Panel title"
def makeSettings(self, settingsSizer):
helper = gui.guiHelper.BoxSizerHelper(self, sizer=settingsSizer)
intro = "Text that should be spoken on tabbing into panel."
introItem = helper.addItem(wx.StaticText(self, label=intro))
introItem.Wrap(self.scaleSize(PANEL_DESCRIPTION_WIDTH))
self.cb = helper.addItem(wx.CheckBox(self, label="stuff on/off"))
self.cb.Value = False
# End
Obviously, I know there should be translation features, and the names are ill-advised. This is just for demonstration purposes.
Does anyone know what I'm missing that makes similar code work in gui.settingsPanels, but not work here?
Luke
Lukasz Golonka
On Wed, 27 Apr 2022 06:40:29 -0400 (EDT)
"Luke Davis" <luke@...> wrote:
present in WX - see class SettingsPanelAccessible.
To determine what description to use this class uses a instance variable
panelDescription, so adding that variable to the panel and assigning
your text to it should do the trick.
--
Regards
Lukasz
"Luke Davis" <luke@...> wrote:
Does anyone know what I'm missing that makes similar code work in gui.settingsPanels, but not work here?The description is associated with the panel using accessibility support
present in WX - see class SettingsPanelAccessible.
To determine what description to use this class uses a instance variable
panelDescription, so adding that variable to the panel and assigning
your text to it should do the trick.
--
Regards
Lukasz
Luke Davis
Lukasz Golonka via groups.io wrote:
I saw that class variable, but since it was being used in makeSettings():
wx.StaticText(self, label=self.panelDescription)
it didn't occur to me that it might be used separately as well.
Appreciate the rapid response!
Luke
The description is associated with the panel using accessibility supportAh. Thanks.
present in WX - see class SettingsPanelAccessible.
To determine what description to use this class uses a instance variable
panelDescription, so adding that variable to the panel and assigning
your text to it should do the trick.
I saw that class variable, but since it was being used in makeSettings():
wx.StaticText(self, label=self.panelDescription)
it didn't occur to me that it might be used separately as well.
Appreciate the rapid response!
Luke