Repository: nvaccess/nvda

Issue:
In Excel ribbon, NVDA does not inform about the unavailable items as navilable and gives no info.
the following is a use case given by a bank employee:

Use case– NVDA does not report menu buttons “unavailable” status.
In excel 2010 or other Microsoft office programs such as power point and word to learn about the ribbons and all menu options I have pressed alt key to select a menu and then using tab key reading and understanding each group and its options.  NVDA is reading options with good features of tool tip description and shortcuts however with NVDA I am completely missing out critical state as disabled (visibly greyed out) options.  Here NVDA reads options but does not report it is “unavailable”.  As a screen reader user I hit enter on such options / buttons to activate it but nothing happens.  This is a bug.  However JAWS speaks for the greyed options as “unavailable”<menu/button.

Examples of such unavailable (visibly greyed out) options which are there on the menus for a blank sheet opened are 

view menu ribbon
show group – ruler check box 
windows group - synchronous scrolling and reset window positions 

review menu ribbon
comments group – delete, previous, next and show / hide comments

data menu ribbon
connections group - properties
sort & filter group – clear and reapply
outline group - show detail and hide detail

formulae menu ribbon
use in formulae

page layout menu ribbon
average group – group and rotate



Discussion:
Confirmed. Technical: We need to support the UIA IsEnabled property.

P2 because we're reporting incorrect/misleading info and because it should be fairly easy to fix.


Resolving patch:
diff --git a/source/NVDAObjects/UIA/__init__.py b/source/NVDAObjects/UIA/__init__.py
--- a/source/NVDAObjects/UIA/__init__.py
+++ b/source/NVDAObjects/UIA/__init__.py
@@ -764,7 +764,7 @@ def _get_keyboardShortcut(self):
 
 	def _get_UIACachedStatesElement(self):
 		statesCacheRequest=UIAHandler.handler.clientObject.createCacheRequest()
-		for prop in (UIAHandler.UIA_HasKeyboardFocusPropertyId,UIAHandler.UIA_SelectionItemIsSelectedPropertyId,UIAHandler.UIA_IsDataValidForFormPropertyId,UIAHandler.UIA_IsRequiredForFormPropertyId,UIAHandler.UIA_ValueIsReadOnlyPropertyId,UIAHandler.UIA_ExpandCollapseExpandCollapseStatePropertyId,UIAHandler.UIA_ToggleToggleStatePropertyId,UIAHandler.UIA_IsKeyboardFocusablePropertyId,UIAHandler.UIA_IsPasswordPropertyId,UIAHandler.UIA_IsSelectionItemPatternAvailablePropertyId):
+		for prop in (UIAHandler.UIA_HasKeyboardFocusPropertyId,UIAHandler.UIA_SelectionItemIsSelectedPropertyId,UIAHandler.UIA_IsDataValidForFormPropertyId,UIAHandler.UIA_IsRequiredForFormPropertyId,UIAHandler.UIA_ValueIsReadOnlyPropertyId,UIAHandler.UIA_ExpandCollapseExpandCollapseStatePropertyId,UIAHandler.UIA_ToggleToggleStatePropertyId,UIAHandler.UIA_IsKeyboardFocusablePropertyId,UIAHandler.UIA_IsPasswordPropertyId,UIAHandler.UIA_IsSelectionItemPatternAvailablePropertyId,UIAHandler.UIA_IsEnabledPropertyId):
 			statesCacheRequest.addProperty(prop)
 		return self.UIAElement.buildUpdatedCache(statesCacheRequest)
 
@@ -788,6 +788,8 @@ def _get_states(self):
 			states.add(controlTypes.STATE_CHECKABLE if role==controlTypes.ROLE_RADIOBUTTON else controlTypes.STATE_SELECTABLE)
 			if e.getCachedPropertyValue(UIAHandler.UIA_SelectionItemIsSelectedPropertyId):
 				states.add(controlTypes.STATE_CHECKED if role==controlTypes.ROLE_RADIOBUTTON else controlTypes.STATE_SELECTED)
+		if not e.getCachedPropertyValueEx(UIAHandler.UIA_IsEnabledPropertyId,True):
+			states.add(controlTypes.STATE_UNAVAILABLE)
 		try:
 			isDataValid=e.getCachedPropertyValueEx(UIAHandler.UIA_IsDataValidForFormPropertyId,True)
 		except COMError:


Test patch: