Repository navigation
Conversation
Headings now use the AXHeading role (NSAccessibilityHeadingRole, macOS 26) instead of the non-standard "Heading" string, and expose their level both as AXHeadingLevel (1-based) and as AXValue, as WebKit and Chromium do for older releases. Tables, grids and tree grids now expose AXRows (their rows, including rows inside row groups), AXRowCount, AXColumnCount and AXColumnHeaderUIElements; rows expose AXIndex; cells expose AXRowIndexRange and AXColumnIndexRange. Counts and indices come from the provider. When the provider gives none, AXRowCount falls back to the number of rows exposed and every other structural attribute is withheld through isAccessibilitySelectorAllowed: instead of being reported as 0.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On macOS, headings and tables currently expose almost no structure:
Role::Headingmaps to the role string"Heading", which is not a standard AX role, and the node'slevelis never read.AXRows,AXRowCount,AXColumnCount,AXIndex, cell ranges or column headers (issue Computed table information #10 covers the related computed-table case).This PR:
Role::HeadingtoAXHeading(NSAccessibilityHeadingRole, macOS 26), and exposes the level asAXHeadingLevel(1-based) and asAXValue, as WebKit and Chromium do for releases before macOS 26;Table,GridandTreeGrid:AXRows(row children plus the rows insideRowGroupchildren),AXRowCount,AXColumnCountandAXColumnHeaderUIElements(theColumnHeadercells of its rows);AXIndex; for cells (Cell,GridCell,ColumnHeader,RowHeader):AXRowIndexRangeandAXColumnIndexRange.Counts and indices come only from the provider (
row_count,column_count,row_index,column_index, spans). When the provider gives none,AXRowCountfalls back to the number of rows exposed, and every other structural attribute is withheld throughisAccessibilitySelectorAllowed:rather than reported as 0.AXColumnsis not implemented (AppKit marks it optional), and neither are per-cell header links, since AccessKit has no property for them.accessibilityAttributeValue:now returnsNSObjectinstead ofNSString, so that it can return anNSNumberforAXHeadingLevel; the existing string attributes are unchanged.Testing
On macOS 27 (Apple silicon), with a winit host exposing a book chapter with four headings (levels 1, 2, 1, 2) and a 3 × 2 table with a header row, queried through
AXUIElement:Heading, role description "Heading", no level; table with noAXRowsor counts;AXHeading, description "heading",AXHeadingLevel1, 2, 1, 2;AXRowsholding exactly the 3 rows,AXRowCount3,AXColumnCount2, each row'sAXIndex, each cell's row and column range, andAXColumnHeaderUIElementsequal to the two header cells;cargo fmt --check,cargo clippy -p accesskit_macos --all-targets -- -D warningsandcargo test -p accesskit_macospass. The adapter has no unit tests to extend; I have not built with Rust 1.87 locally, and nothing here uses newer language or library features. VoiceOver itself has not yet been run against this build.