Skip to content

Computed table information #10

Open

Description

@mwcampbell

accesskit_consumer::Node should have functions for returning table-related information, such as row and column indices and counts. Each of these functions should compute the attribute if it's not specified by the provider.

Activity

  1. charlesjhlee commented on Oct 28, 2026

    @charlesjhlee

    We needed this for a spreadsheet grid with 10,000,000 rows on every platform, so we built it on the 0.25 line and would like to contribute it. Patches (against main, applying cleanly): https://gist.github.com/charlesjhlee/7c608375a2df156c88d33b92d655e055

    Consumer (accesskit_consumer/src/table.rs): NodeRef::table_row_count, table_column_count, table_rows, table_row_index, table_cell_row_index, table_cell_column_index, spans, table_cell_at(row, col), table_column_headers, table_row_headers, table_cell_column_headers, table_cell_row_headers, table_selected_cells. Each is computed from the tree when the provider gave nothing, looking through row groups and generic containers, and uses the provider's row_count/row_index as logical values when given, so a virtualised table (a few dozen rows in the tree) reports its real size.

    One design point to agree on: the schema counts header rows as ARIA does, but UIA's Grid, NSAccessibility's table attributes, AT-SPI's Table and Android's CollectionInfo expose column headers as header items, not data rows. The helpers therefore leave the leading rows made only of column headers out of the platform count and indices: a grid with row_count 10,000,001 (one header row) is 10,000,000 rows, and row_index 4,000,001 is platform row 4,000,000, which screen readers speak as "row 4,000,001 of 10,000,000". Happy to change this if you prefer another rule.

    The adapter patches build on it (UIA, macOS, AT-SPI, Android; separate comments on #29 and #830 and a new issue). Everything builds with Rust 1.87. Should we split it as consumer first, then one change per adapter?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions