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
merged 8 commits into from Mar 7, 2018

Conversation

Projects
None yet
3 participants
@michaelDCurran
Contributor

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

@michaelDCurran michaelDCurran requested a review from feerrenrut Feb 9, 2018

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

This comment has been minimized.

@feerrenrut

feerrenrut Feb 9, 2018

Contributor

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.

@feerrenrut

feerrenrut Feb 9, 2018

Contributor

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.

This comment has been minimized.

@michaelDCurran

michaelDCurran Feb 10, 2018

Contributor

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

@michaelDCurran

michaelDCurran Feb 10, 2018

Contributor

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

michaelDCurran added a commit that referenced this pull request Feb 19, 2018

@michaelDCurran

This comment has been minimized.

Show comment
Hide comment
@michaelDCurran

michaelDCurran Feb 19, 2018

Contributor

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

Contributor

michaelDCurran commented Feb 19, 2018

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

@michaelDCurran michaelDCurran requested a review from feerrenrut Mar 6, 2018

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