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 ARIA table attributes, skip layout tables, and don't get stuck on hidden cells #7410

Merged
merged 4 commits into from Aug 2, 2017

Conversation

Projects
None yet
4 participants
@michaelDCurran
Contributor

michaelDCurran commented Jul 17, 2017

Link to issue number:

Fixes #6652
Fixes #5655
Fixes #7382

Summary of the issue:

Tables are becoming more complex on the web. to ensure that they remain accessible, ARIA allows for adding attributes to tables, rows and cells which expose more logical coordinates to the user, as the physical table's coordinates may be affected by hidden or not yet loaded data.
NVDA needs to report the ARIA coordinates and counts to the user, yet at the same time ensure it is still navigating the physical topology of the table. NVDA should also ensure that it does not stop on cells hidden with aria-hidden.
Further to this, layout tables should never be included in table navigation commands.

Description of how this pull request fixes the issue:

  • Gecko browseMode: skip over hidden table cells in table navigation commands. MSHTML already did this.
  • No longer include layout tables in table navigation commands
  • IAccessible NVDAObject properties: rowNumber, columnNumber, rowCount and columnCount now expose the ARIA values if available, otherwise falling back to the original physical table information.
  • Gecko controlField attributes: table-rownumber, table-columnnumber, table-rowcount and table-columncount now expose the ARIA values if available, otherwising falling back to the original physical table information
  • New Gecko controlField attributes: table-physicalrownumber, table-physicalcolumnnumber, table-physicalrowcount and table-physicalcolumncount values always expose the physical table information no matter what the presentational values may be.
  • Added new class variables to BrowseModeDocumentTreeInterceptor: navigationalTableRowNumberAttributeName and navigationalTableColumnNumberAttributeName which are used by BrowseModeDocumentTreeInterceptor._getTableCellCoords in place of the literal strings "table-rownumber" and "table-columnnumber" respectively, to allow fetching of the correct attributes containing physical table information.
  • Gecko_ia2 VirtualBuffer: override navigationalTableRowNumberAttributeName and navigationalTableColumnNumberAttributeName To provide the use of table-physicalrownumber and table-physicalcolumnnumber.

Testing performed:

Known issues with pull request:

  • ARIA table attributes not supported in Internet Explorer as it is ARIA 1.1. However, it would not be that hard to add them.
  • Chrome still has issues when navigating tables with hidden cells due to the coordinates that its accessibleTable interface accepts. It seems as though it is not returning a table cell when the cell is hidden with aria-hidden="true". Also some cells with display:None can confuse column and row counts.

Change log entry:

TBD

michaelDCurran added some commits Jul 15, 2017

Add support for ARIA rowindex, colindex, rowcount and colcount in Gec…
…ko / Chrome for both browse mode and focus mode.

Specifically:
* IAccessible NVDAObject properties: rowNumber, columnNumber, rowCount and columnCount now expose the ARIA values if available, otherwise falling back to the original physical table information.
* Gecko controlField attributes: table-rownumber, table-columnnumber, table-rowcount and table-columncount now expose the ARIA values if available, otherwising falling back to the original physical table information
*  New Gecko controlField attributes: table-physicalrownumber, table-physicalcolumnnumber, table-physicalrowcount and table-physicalcolumncount values always expose the physical table information no matter what the presentational values may be.
* Added new class variables to BrowseModeDocumentTreeInterceptor: navigationalTableRowNumberAttributeName and navigationalTableColumnNumberAttributeName which are used by BrowseModeDocumentTreeInterceptor._getTableCellCoords in place of  the literal strings "table-rownumber" and "table-columnnumber" respectively, to allow fetching of the correct attributes containing physical table information.
* Gecko_ia2 VirtualBuffer: override navigationalTableRowNumberAttributeName and navigationalTableColumnNumberAttributeName To provide the use of table-physicalrownumber and table-physicalcolumnnumber.
Show outdated Hide outdated nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp
Show outdated Hide outdated nvdaHelper/vbufBackends/gecko_ia2/gecko_ia2.cpp
Show outdated Hide outdated source/browseMode.py
Show outdated Hide outdated source/browseMode.py
Show outdated Hide outdated source/browseMode.py
Address review actions:
* In the gecko vbufBackend: comment why two sets of table attributes are being added.
* browseModeDocumentTreeInterceptor._getNearestTableCell: make the retry limit configurable via a _missingTableCellSearchLimit property.
* browseModeDocumentTreeInterceptor._getNearestTableCell: try more cells for any LookupError not just hiddenTableCellFound (browsers such as chrome do not expose hidden cells).
* remove browseMode.HiddenTableCellFound
* Gecko_ia2 virtualBuffer's _getTableCellAt: raise LookupError if a hidden cell is found rather than HiddenTableCellFound

@michaelDCurran michaelDCurran requested a review from jcsteh Jul 19, 2017

@jcsteh

jcsteh approved these changes Jul 19, 2017

Nice.

michaelDCurran added a commit that referenced this pull request Jul 19, 2017

@derekriemer

This comment has been minimized.

Show comment
Hide comment
@derekriemer

derekriemer Aug 1, 2017

Collaborator

Worth mentioning a long standing but here.

  1. go to example 2 of https://www.w3.org/TR/wai-aria-practices/examples/grid/dataGrids.html
  2. switch to focus mode. after focusing 1,1
  3. use table nav commands.

expected, either nothing, or movement.
Actual: movement is allowed left and right, but up/down do nothing.

Collaborator

derekriemer commented Aug 1, 2017

Worth mentioning a long standing but here.

  1. go to example 2 of https://www.w3.org/TR/wai-aria-practices/examples/grid/dataGrids.html
  2. switch to focus mode. after focusing 1,1
  3. use table nav commands.

expected, either nothing, or movement.
Actual: movement is allowed left and right, but up/down do nothing.

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