Skip to content

Fix up of: Fix up of: Don't announce 'selected' when the focus moves in Google sheets if the focused cell is the only cell selected (#8898)#9930

Closed
JulienCochuyt wants to merge 1 commit intonvaccess:masterfrom
accessolutions:pr8898-mshtmlGetTableNotImplemented
Closed

Fix up of: Fix up of: Don't announce 'selected' when the focus moves in Google sheets if the focused cell is the only cell selected (#8898)#9930
JulienCochuyt wants to merge 1 commit intonvaccess:masterfrom
accessolutions:pr8898-mshtmlGetTableNotImplemented

Conversation

@JulienCochuyt
Copy link
Copy Markdown
Contributor

@JulienCochuyt JulienCochuyt commented Jul 15, 2019

Link to issue number:

Fixes #9520
Fixes #7292 (comment) (only the error log in the comment, not the whole issue).
Faulty behavior introduced as of b02ed2d (#8898)

Summary of the issue:

MSHTML._get_table historically raises a NotImplementedError when there is no surrounding table.
IAccessible._get_table, on the other hand, returns None in the same situation.
IAccessible._get_selectionContainer, introduced by b02ed2d, calls self.table which can lead to the following error log:

ERROR - queueHandler.flushQueue (13:44:56.473):
Error in func _loadBufferDone from eventQueue
Traceback (most recent call last):
  File "queueHandler.pyo", line 53, in flushQueue
  File "virtualBuffers\__init__.pyo", line 464, in _loadBufferDone
  File "browseMode.pyo", line 1190, in event_treeInterceptor_gainFocus
  File "browseMode.pyo", line 1513, in event_gainFocus
  File "browseMode.pyo", line 1190, in <lambda>
  File "NVDAObjects\__init__.pyo", line 1030, in event_gainFocus
  File "NVDAObjects\__init__.pyo", line 918, in reportFocus
  File "speech.pyo", line 416, in speakObject
  File "speech.pyo", line 340, in speakObjectProperties
  File "baseObject.pyo", line 47, in __get__
  File "baseObject.pyo", line 147, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\__init__.pyo", line 1265, in _get_selectionContainer
  File "baseObject.pyo", line 47, in __get__
  File "baseObject.pyo", line 147, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\MSHTML.pyo", line 957, in _get_table
NotImplementedError

Description of how this pull request fixes the issue:

Return None instead of raising NotImplementedError in MSHTML._get_table, in coherence with its base class.

Testing performed:

Browsed with IE11 under Windows 10 to (http://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-1/tabs.html) (which is the test case of #9520 and report focus on the example tab header.

Known issues with pull request:

This approach can theoretically break existing assumption of the method raising the exception, but other IAccessible implementation have been recently much more tested and return None in the same case.
So, I guess it is safer to apply the proposed change than to track every single call to _get_table and enclose in a try...except block, with the risk of missing a few of them in the process.

Change log entry:

Section: Bug fixes

NVDA is no longer silent when focusing an HTML tab header in Internet Explorer.

…in Google sheets if the focused cell is the only cell selected (nvaccess#8898)
@JulienCochuyt JulienCochuyt force-pushed the pr8898-mshtmlGetTableNotImplemented branch from f16ce99 to b464c43 Compare July 15, 2019 14:40
@JulienCochuyt
Copy link
Copy Markdown
Contributor Author

b464c43: Rebased onto latest master.

@JulienCochuyt
Copy link
Copy Markdown
Contributor Author

cc @michaelDCurran, @feerrenrut

JulienCochuyt added a commit to accessolutions/WebAccessForNVDA that referenced this pull request Jul 17, 2019
@JulienCochuyt JulienCochuyt deleted the pr8898-mshtmlGetTableNotImplemented branch August 12, 2019 14:00
@Adriani90
Copy link
Copy Markdown
Collaborator

Adriani90 commented Aug 12, 2019

@JulienCochuyt strangely this PR seems closed by you but in Github insights it appears like it is still open. So is this still valid? Are you working on it?

@JulienCochuyt
Copy link
Copy Markdown
Contributor Author

@JulienCochuyt strangely this PR seems closed by you but in Github insights it appears like it is still open. So is this still valid? Are you working on it?

The branch has erroneously been pruned while syncing our fork.
I am closing this PR and reopening a new one with the same fix rebased onto latest master.

@JulienCochuyt
Copy link
Copy Markdown
Contributor Author

Reopened as PR #10080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NVDA doesn't announce tabs in IE11 ARIA Tabs- NVDA does not list the total number of tabs in IE (Second Tab, tab selected, 2 of 3)

2 participants