-
-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't announce 'selected' when the focus moves in Google sheets if the focused cell is the only cell selected #8879
Conversation
…e focused cell is the only cell selected.
I updated the initial description in order for it to automatically close #8766 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be curious what this does with braille, but I"m currently unable to test with braille. I'd say we also want to apply the "don't present selected if only one item is selected" case to braille as well?
source/controlTypes.py
Outdated
@@ -727,7 +727,7 @@ def processNegativeStates(role, states, reason, negativeStates=None): | |||
# but only if it is either focused or this is something other than a change event. | |||
# The condition stops "not selected" from being spoken in some broken controls | |||
# when the state change for the previous focus is issued before the focus change. | |||
if role in (ROLE_LISTITEM, ROLE_TREEVIEWITEM, ROLE_TABLEROW) and STATE_SELECTABLE in states and (reason != REASON_CHANGE or STATE_FOCUSED in states): | |||
if role in (ROLE_LISTITEM, ROLE_TREEVIEWITEM, ROLE_TABLEROW,ROLE_TABLECELL,ROLE_TABLECOLUMNHEADER,ROLE_TABLEROWHEADER) and STATE_SELECTABLE in states and (reason != REASON_CHANGE or STATE_FOCUSED in states): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you split this into multiple lines?
@LeonarddeR: Hi have addressed your review comments for
IAccessible.getSelectedItemsCount and
controlTypes.processNegativeStates. However:
In regards to braille: because Braille does not currently show negative
states such as 'not selected', if we took away 'selected' in this case
there would be an ambiguity. And this would have always been the case,
not just for Google Sheets.
My feeling is that we should just leave braille changes out for now,
until we can come up with a better presentation of 'not selected' verses
'selected' in braille... unless I'm not understanding you correctly here.
|
try: | ||
sel=self.IAccessibleObject.accSelection | ||
except COMError as e: | ||
log.debugWarning("Error fetching accSelection, %s"%e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is going to be fairly common (and expected in chrome, perhaps it's worth lowing the level to debug)
return super(IAccessible,self).selectionContainer | ||
|
||
def getSelectedItemsCount(self,maxCount): | ||
# To fetch the number of selected items, we first try MSAA's accSelection, but if that fails in any way, we fall back to using IAccessibleTable2's nSelectedCells, if we are on an IAccessible2 table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest splitting this into two internal helper methods:
- _getSelectedItemsCount_MSAA
- _getSelectedItemsCount_IAccesibleTable2
This way the the return paths can be simplified, and the two approaches are more clearly separated.
source/speech.py
Outdated
|
||
states=newPropertyValues.get('states') | ||
if states is not None and reason==controlTypes.REASON_FOCUS: | ||
if controlTypes.STATE_SELECTABLE in states and controlTypes.STATE_SELECTED in states and obj.selectionContainer and obj.selectionContainer.getSelectedItemsCount(2)==1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you split these conditions up over multiple lines please.
@feerrenrut I split out the accSelection stuff into its own helper method. But as the IAccessibleTable2 code is only one call I left it in the original method. I also addressed your other review comments. |
This pr is causing 'not selected' to be announced when navigating by table cell in browse mode. |
…ted in braille and speech" (#8899) * Revert "Revert "Don't announce 'selected' when the focus moves in Google sheets if the focused cell is the only cell selected (#8879)" (#8893)" This reverts commit b4e9e83. * Revert "Don't announce 'selected' when the focus moves in Google sheets if the focused cell is the only cell selected (#8879)" This reverts commit 51f5b2f. * Revert "Merge all vbufBackend dlls into nvdaHelperRemote.dll (#8866)" This reverts commit 24f5123. * Revert "Fix handling of table cells without a containing table in browse mode. (#8887)" This reverts commit 5fe34c5. * Revert "Ensure that labels explicitly set on divs and spans are reported in braille and speech (#8886)" This reverts commit fd24d81.
Link to issue number:
Fixes #8766
Summary of the issue:
When navigating cells in Google Sheets with GoogleShets Braille mode enabled, NVDA reports 'selected' for every cell the focus moves to.
Although this is technically correct (the cell is selected), it is not at all practical. Most if not all cells that are focused will be selected. So it ends up being redundant information.
We should change the experience so that:
Description of how this pull request fixes the issue:
This PR implements these rules by the following:
Testing performed:
Created a new sheet in Google Sheets. Moved focus around the cells. NVDA no longer announced 'selected' if the focused cell was the only cell selected.
Known issues with pull request:
None.
Change log entry:
Bug fixes: