Skip to content

Commit 0d1925b

Browse files
authored
Merge 9e63993 into 72e4ff9
2 parents 72e4ff9 + 9e63993 commit 0d1925b

5 files changed

Lines changed: 27 additions & 13 deletions

File tree

source/NVDAObjects/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: UTF-8 -*-
22
# A part of NonVisual Desktop Access (NVDA)
33
# Copyright (C) 2006-2023 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Patrick Zajda, Babbage B.V.,
4-
# Davy Kager
4+
# Davy Kager, Leonard de Ruijter
55
# This file is covered by the GNU General Public License.
66
# See the file COPYING for more details.
77

@@ -1204,7 +1204,7 @@ def event_mouseMove(self, x: int, y: int) -> None:
12041204

12051205
if not self._mouseEntered and config.conf['mouse']['reportObjectRoleOnMouseEnter']:
12061206
speech.cancelSpeech()
1207-
speech.speakObjectProperties(self,role=True)
1207+
speech.speakObject(self, reason=controlTypes.OutputReason.MOUSE)
12081208
speechWasCanceled=True
12091209
else:
12101210
speechWasCanceled=False

source/gui/settingsDialogs.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: UTF-8 -*-
21
# A part of NonVisual Desktop Access (NVDA)
32
# Copyright (C) 2006-2023 NV Access Limited, Peter Vágner, Aleksey Sadovoy,
43
# Rui Batista, Joseph Lee, Heiko Folkerts, Zahari Yurukov, Leonard de Ruijter,
@@ -1827,10 +1826,12 @@ def makeSettings(self, settingsSizer):
18271826

18281827
# Translators: This is the label for a checkbox in the
18291828
# mouse settings panel.
1830-
reportObjectRoleText = _("Report &role when mouse enters object")
1831-
self.reportObjectRoleCheckBox=sHelper.addItem(wx.CheckBox(self,label=reportObjectRoleText))
1832-
self.bindHelpEvent("MouseSettingsRole", self.reportObjectRoleCheckBox)
1833-
self.reportObjectRoleCheckBox.SetValue(config.conf["mouse"]["reportObjectRoleOnMouseEnter"])
1829+
reportObjectPropertiesText = _("Report &object when mouse enters it")
1830+
self.reportObjectPropertiesCheckBox = sHelper.addItem(
1831+
wx.CheckBox(self, label=reportObjectPropertiesText)
1832+
)
1833+
self.bindHelpEvent("MouseSettingsRole", self.reportObjectPropertiesCheckBox)
1834+
self.reportObjectPropertiesCheckBox.SetValue(config.conf["mouse"]["reportObjectRoleOnMouseEnter"])
18341835

18351836
# Translators: This is the label for a checkbox in the
18361837
# mouse settings panel.
@@ -1857,11 +1858,14 @@ def onSave(self):
18571858
config.conf["mouse"]["reportMouseShapeChanges"]=self.shapeCheckBox.IsChecked()
18581859
config.conf["mouse"]["enableMouseTracking"]=self.mouseTrackingCheckBox.IsChecked()
18591860
config.conf["mouse"]["mouseTextUnit"]=self.textUnits[self.textUnitComboBox.GetSelection()]
1860-
config.conf["mouse"]["reportObjectRoleOnMouseEnter"]=self.reportObjectRoleCheckBox.IsChecked()
1861+
config.conf["mouse"]["reportObjectRoleOnMouseEnter"] = (
1862+
self.reportObjectPropertiesCheckBox.IsChecked()
1863+
)
18611864
config.conf["mouse"]["audioCoordinatesOnMouseMove"]=self.audioCheckBox.IsChecked()
18621865
config.conf["mouse"]["audioCoordinates_detectBrightness"]=self.audioDetectBrightnessCheckBox.IsChecked()
18631866
config.conf["mouse"]["ignoreInjectedMouseInput"]=self.ignoreInjectedMouseInputCheckBox.IsChecked()
18641867

1868+
18651869
class ReviewCursorPanel(SettingsPanel):
18661870
# Translators: This is the label for the review cursor settings panel.
18671871
title = _("Review Cursor")

source/speech/speech.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,8 @@ def getObjectSpeech(
643643
# Choose when we should report the content of this object's textInfo, rather than just the object's value
644644
import browseMode
645645
shouldReportTextContent=not (
646-
# focusEntered should never present text content
647-
(reason == OutputReason.FOCUSENTERED)
646+
# focusEntered or mouse should never present text content
647+
reason in (OutputReason.FOCUSENTERED, OutputReason.MOUSE)
648648
# The rootNVDAObject of a browseMode document in browse mode (not passThrough)
649649
# should never present text content
650650
or (
@@ -729,10 +729,16 @@ def _objectSpeech_calculateAllowedProps(reason, shouldReportTextContent):
729729
"columnSpan": True,
730730
"current": True
731731
}
732-
if reason == OutputReason.FOCUSENTERED:
732+
if reason in (OutputReason.FOCUSENTERED, OutputReason.MOUSE):
733733
allowProperties["value"] = False
734734
allowProperties["keyboardShortcut"] = False
735735
allowProperties["positionInfo_level"] = False
736+
if reason == OutputReason.MOUSE:
737+
# Name is often part of the text content when mouse tracking.
738+
allowProperties["name"] = False
739+
allowProperties["description"] = False
740+
allowProperties["positionInfo_indexInGroup"] = False
741+
allowProperties["positionInfo_similarItemsInGroup"] = False
736742
if not config.conf["presentation"]["reportObjectDescriptions"]:
737743
allowProperties["description"] = False
738744
if not config.conf["presentation"]["reportKeyboardShortcuts"]:

user_docs/en/changes.t2t

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ What's New in NVDA
1313

1414
== Changes ==
1515
- The following commands now support two and three presses to spell the reported information and spell with character descriptions: report selection, report clipboard text and report focused object. (#15449)
16+
- The option "Report role when mouse enters object" in NVDA's mouse settings category has been renamed to "Report object when mouse enters it".
17+
This option now announces additional relevant information about an object when the mouse enters it, such as states (checked/pressed) or cell coordinates in a table. (#15420)
1618
-
1719

1820
== Bug Fixes ==

user_docs/en/userGuide.t2t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,8 +1957,10 @@ The options are character, word, line and paragraph.
19571957

19581958
To toggle text unit resolution from anywhere, please assign a custom gesture using the [Input Gestures dialog #InputGestures].
19591959

1960-
==== Report role when mouse enters object ====[MouseSettingsRole]
1961-
If this checkbox is checked, NVDA will announce the role (type) of object as the mouse moves inside it.
1960+
==== Report object when mouse enters it ====[MouseSettingsRole]
1961+
If this checkbox is checked, NVDA will announce information about objects as the mouse moves inside them.
1962+
This includes the role (type) of the object as well as states (checked/pressed), cell coordinates in tables, etc.
1963+
Note that the announcement of some object details might be dependent on how other settings are set, such as in the [object presentation #ObjectPresentationSettings] or [Document Formatting #DocumentFormattingSettings] categories.
19621964

19631965
==== Play audio coordinates when mouse moves ====[MouseSettingsAudio]
19641966
Checking this checkbox makes NVDA play beeps as the mouse moves, so that the user can work out where the mouse is in regards to the dimensions of the screen.

0 commit comments

Comments
 (0)