Skip to content
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

Support tables in Kindle for PC #7977

merged 8 commits into from Mar 7, 2018

Support tables in Kindle for PC #7977

merged 8 commits into from Mar 7, 2018


Copy link

@michaelDCurran michaelDCurran commented Feb 9, 2018

Link to issue number:

Fixes #6138

Summary of the issue:

Amazon has recently been implementing accessibility support for tables within Kindle for PC. Therefore, once this is publically released, and there are books with table content available, ATs such as NVDA will be able to allow reporting of tables and table navigation within kfx books.

Description of how this pull request fixes the issue:

This PR adds support for tables within Kindle for PC.

  • Adds support for the IAccessibleTable2 interface, and makes further use of the IAccessibleTableCell interface. As Kindle for PC is a very recent table implementation, they have not bothered implementing the older IAccessibleTable interface.
  • Adds support for jumping to next / previous table in Kindle for PC with t / shift+t , and also classes tables as a container in Kindle (for jumping to the beginning/end with comma and shift+comma).
  • The kindle document treeInterceptor now inherits from the recently added DocumentWithTableNavigation, and also implements _getTableCellAt, allowing table navigation within Kindle tables.

Testing performed:

Navigated multiple books in various private builds of Kindle for PC. Table support should be publically available in their next release.
Navigated tables in Mozilla Firefox, to ensure IAccessibleTable2 works okay there as well. Note that NVDA will fall back to IAccessibleTable when IAccessibleTable2 is not available.

Known issues with pull request:

This PR depends on PR #7872 (support for reporting colspan and rowspan), but is not included directly in this PR.

Change log entry:

  • New features:
  • The ability to read and navigate tables in Kindle for PC.

@@ -63,6 +65,28 @@ def isAlive(self):
def __contains__(self,obj):
return obj==self.rootNVDAObject

def _getTableCellAt(self,tableID,startPos,destRow,destCol):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a docstring for this? At a glance I don't understand why there is start and dest passed in, is this a range?
Perhaps its an override, and the docstring is on another class? Hard to know since this class inherits from a few classes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to the docstring on documentBase.DocumentWithTableNavigation._getTableCellAt.

Copy link
Member Author

@feerrenrut: I referred to the base class in the docstring for _getTableCellAt. I'm not sure if you completed review but I did incubate this early to ensure we get a good test period on Next. Your review is still required before Master.

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

Successfully merging this pull request may close these issues.

IAccessible NVDAObject: Use IAccessibleTable2/IAccessibleTableCell for row/col indexes/counts
3 participants