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)#10080
Conversation
…in Google sheets if the focused cell is the only cell selected (nvaccess#8898)
| if nodeName=="TABLE": return MSHTML(HTMLNode=HTMLNode) | ||
| HTMLNode=HTMLNode.parentNode | ||
| raise NotImplementedError | ||
| return None |
There was a problem hiding this comment.
I wonder whether this should be logged
There was a problem hiding this comment.
IMHO, it shouldn't: This None is not an error, but rather a piece of information.
If the object is not part of a table, the other IAccessible implementations in NVDA simply return None without a notice.
| nodeName=HTMLNode.nodeName | ||
| if nodeName: | ||
| nodeName=nodeName.upper() | ||
| if nodeName=="TABLE": return MSHTML(HTMLNode=HTMLNode) |
There was a problem hiding this comment.
This does not support aria based tables (e.g. role grid). I don't think that's a problem, though it might deserve a change or a comment.
There was a problem hiding this comment.
I am not much aware of the aria based tables support, but please feel free to propose any useful comment to insert here.
As long as this PR does not change a thing in that scope - that is, no client code is expecting a NotImplementedError - I would suppose that further refining the process is out of the scope of this PR, don't you think?
|
@JulienCochuyt I assume in the changelog you meant "table header" not "tab header"? Just checking before I merge and add that message to the changes file. |
No, I indeed really meant "tab" header, aka. tab control, the control which allows to select a tab panel. |
|
Ah, okay :) thanks for confirming.
|
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_tablehistorically raises aNotImplementedErrorwhen there is no surrounding table.IAccessible._get_table, on the other hand, returnsNonein the same situation.IAccessible._get_selectionContainer, introduced by b02ed2d, callsself.tablewhich can lead to the following error log:Description of how this pull request fixes the issue:
Return
Noneinstead of raisingNotImplementedErrorinMSHTML._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
Nonein the same case.So, I guess it is safer to apply the proposed change than to track every single call to
_get_tableand enclose in atry...exceptblock, 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.