From 365f032182f440f36e6b35012216666ec4ee3813 Mon Sep 17 00:00:00 2001 From: James Teh Date: Fri, 10 Jun 2011 10:45:31 +1000 Subject: [PATCH] speech: Don't report submenu for combo boxes. Don't report collapsed/expanded for combo boxes unless explicitly queried. --- source/speech.py | 7 +++++++ user_docs/en/changes.t2t | 2 ++ 2 files changed, 9 insertions(+) diff --git a/source/speech.py b/source/speech.py index ba2d2d10d..d65777706 100755 --- a/source/speech.py +++ b/source/speech.py @@ -457,6 +457,9 @@ def processPositiveStates(role, states, reason, positiveStates): if controlTypes.STATE_DRAGGING in positiveStates: # It's obvious that the control is draggable if it's being dragged. positiveStates.discard(controlTypes.STATE_DRAGGABLE) + if role == controlTypes.ROLE_COMBOBOX: + # Combo boxes inherently have a popup, so don't report it. + positiveStates.discard(controlTypes.STATE_HASPOPUP) if reason == REASON_QUERY: return positiveStates positiveStates.discard(controlTypes.STATE_DEFUNCT) @@ -472,6 +475,10 @@ def processPositiveStates(role, states, reason, positiveStates): positiveStates.discard(controlTypes.STATE_READONLY) if role == controlTypes.ROLE_CHECKBOX: positiveStates.discard(controlTypes.STATE_PRESSED) + if role == controlTypes.ROLE_MENUITEM: + # The user doesn't usually care if a menu item is expanded or collapsed. + positiveStates.discard(controlTypes.STATE_COLLAPSED) + positiveStates.discard(controlTypes.STATE_EXPANDED) return positiveStates def processNegativeStates(role, states, reason, negativeStates): diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index 52aee7028..a8f574d70 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -39,6 +39,7 @@ Highlights of this release include major improvements concerning punctuation and - In applications using Mozilla Gecko 2 and later (such as Firefox 4 and later), a document can now be read in browse mode before it is fully finished loading. - NVDA now announces the state of a container when focus moves to a control inside it (e.g. if focus moves inside a document that is still loading it will report it as busy). - NVDA's user interface and documentation no longer use the terms "first child" and "parent" with respect to object navigation, as these terms are confusing for many users. + - Collapsed is no longer reported for some menu items which have sub-menus. == Bug Fixes == @@ -82,6 +83,7 @@ Highlights of this release include major improvements concerning punctuation and - NVDA no longer crashes on Windows xP when starting a WPF application. (#1437) - sayAll and sayall with review cursor is now able to work in some UI automation text controls that support all needed methods. (e.g. you can now use sayAll review on XPS Viewer documents). - NVDA no longer inappropriately classes some list items in the Outlook Express / Windows Live Mail message rules Apply Now dialog as being checkboxes. (#576) +- Combo boxes are no longer reported as having a sub-menu. == Changes for Developers == -- 2.11.0