Skip to content

Support tables in Kindle for PC#7977

Merged
michaelDCurran merged 8 commits into
masterfrom
kindleTables
Mar 7, 2018
Merged

Support tables in Kindle for PC#7977
michaelDCurran merged 8 commits into
masterfrom
kindleTables

Conversation

@michaelDCurran

@michaelDCurran michaelDCurran commented Feb 9, 2018

Copy link
Copy Markdown
Member

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.
Specifically:

  • 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.

def __contains__(self,obj):
return obj==self.rootNVDAObject

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

@michaelDCurran

Copy link
Copy Markdown
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants