register-dynamics / data-import

Components and patterns for building spreadsheet uploaders in digital services
https://register-dynamics.github.io/data-import/
1 stars 0 forks source link

Selecting cells using the table view has accessibility issues #61

Open simonwo opened 1 month ago

simonwo commented 1 month ago

image

The table view is backed by a regular HTML table, and so is largely as accessible as any other table. However, selecting cells has some accessibility issues:

(Aside: note that Reflow doesn't apply to the whole data table, just each cell:)

Data tables have a two-dimensional relationship between the headings and data cells. This relationship is essential to convey the content. This Success Criterion therefore exempts data tables from needing to display without scrolling in the direction of text (e.g., horizontally in a vertically scrolling page). However, cells within data tables are not excepted unless the cell contains types of content that also requires two-dimensional layout for usage or meaning.

simonwo commented 1 month ago

Our existing range selection using the keyboard may actually be fine. We need to learn more about how aria-selected helps or does not, and how signal to the user agent that a cell is selectable if you click it. Probably we do have to introduce some input elements for selecting cells, or mark up cells with appropriate aria-roles (eg a checkbox role?)

Some discussion on appropriate aria-roles: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/grid_role General tutorials on marking up accessible tables: https://www.w3.org/WAI/tutorials/tables/

rossjones commented 1 month ago

Some more useful links:

W3's web accessibility initiative Grid (Interactive Tabular Data and Layout Containers) Pattern

Government Statistical Service (GSS) Accessible spreadsheets : a checklist of the basics