Skip to content

Commit

Permalink
Revert "NVDAObject.presentationType: groupings with position informat…
Browse files Browse the repository at this point in the history
…ion but no name and no description should still be treated as content I.e. announced in focus ancestry. (#14878)" (#15638)

This reverts commit bcc7f25.
Link to issue number:
Reverts pr #14878
Closes #15324
Summary of the issue:
Traditionally, NvDA has only ever announced groupings in the focus ancestry if they have a name or description.
Recently Microsoft had been placing unlabeled groupings within context menus in Office and other places, to denote visual spacing. Microsoft had also recently been exposing position info (x of y) on these groupings.
In order to take advantage of this new info, through suggestion from Microsoft, in pr #14878 NVDA started announcing these unalabeled groupings, if they had position info. the advantage being that the blind user would then have a much better idea of how these context menu items were grouped, and just how many were in each section.
However, it is very clear based on user feedback, that there are way too many small groupings for the extra speech to outway missing info. There are many groupings in these context menus with only 1 or 2 items, greatly slowing down a user's navigation.
Description of user facing changes
NVDA will again no longer report unlabeled gorupings in the focus ancestory.
Description of development approach
Reverts pr #14878.
this pr also tightens up the detection of labels for groupings and similar controls to ignore names and descriptions that only contain whitespace. This is necessary as in some builds of Office, Microsoft also started exposing a space character on the name of unlabeled groupings in order to force screen readers to announce the unlabeled groupings.
  • Loading branch information
michaelDCurran committed Oct 16, 2023
1 parent 799554b commit 9878248
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions source/NVDAObjects/__init__.py
Expand Up @@ -913,23 +913,26 @@ def _get_presentationType(self):
return self.presType_layout
name = self.name
description = self.description
# #15324: Some builds of Microsoft Office expose a space character as the name of unlabeled groupings.
# trying to force NVDA to announce them.
if name and name.isspace():
name = None
if description and description.isspace():
description = None
if not name and not description:
if role in (
controlTypes.Role.WINDOW,
controlTypes.Role.PANEL,
controlTypes.Role.PROPERTYPAGE,
controlTypes.Role.TEXTFRAME,
controlTypes.Role.GROUPING,
controlTypes.Role.OPTIONPANE,
controlTypes.Role.INTERNALFRAME,
controlTypes.Role.FORM,
controlTypes.Role.TABLEBODY,
controlTypes.Role.REGION,
):
return self.presType_layout
# Groupings should only be considered layout (I.e. filtered out)
# if they also don't have any position information as well as no name or description.
if role == controlTypes.Role.GROUPING and not self.name and not self.description and not self.positionInfo:
return self.presType_layout
if role == controlTypes.Role.TABLE and not config.conf["documentFormatting"]["reportTables"]:
return self.presType_layout
if role in (controlTypes.Role.TABLEROW,controlTypes.Role.TABLECOLUMN,controlTypes.Role.TABLECELL) and (not config.conf["documentFormatting"]["reportTables"] or not config.conf["documentFormatting"]["reportTableCellCoords"]):
Expand Down
2 changes: 1 addition & 1 deletion user_docs/en/changes.t2t
Expand Up @@ -23,6 +23,7 @@ Windows 8.1 is the minimum Windows version supported. (#15544)
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, @LeonarddeR)
- When requesting formatting information on Excel cells, borders and background will only be reported if there is such formatting. (#15560, @CyrilleB79)
- The command to toggle the screen curtain now has a default gesture: ``NVDA+control+escape``. (#10560, @CyrilleB79)
- NVDA will again no longer report unlabelled groupings such as in recent versions of Microsoft Office 365 menus. (#15638)
-

== Bug Fixes ==
Expand Down Expand Up @@ -287,7 +288,6 @@ eSpeak-NG, LibLouis braille translator, and Unicode CLDR have been updated.
- Script for reporting the destination of a link now reports from the caret / focus position rather than the navigator object. (#14659)
- Portable copy creation no longer requires that a drive letter be entered as part of the absolute path. (#14680)
- If Windows is configured to display seconds in the system tray clock, using ``NVDA+f12`` to report the time now honors that setting. (#14742)
- NVDA will now report unlabeled groupings that have useful position information, such as in recent versions of Microsoft Office 365 menus. (#14878)
-


Expand Down

0 comments on commit 9878248

Please sign in to comment.