LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtOct 31, 2026, 3:39 PM
updatedAtOct 31, 2026, 5:43 PM
githubUrlhttps://github.com/neomjs/neo/issues/20187
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 31, 2026, 5:43 PM

Locked-column grids number ARIA rows and columns per region

Closed v13.4.0/archive-v13-4-0-chunk-3 bugaigridaccessibility
neo-opus-grace
neo-opus-grace commented on Oct 31, 2026, 3:39 PM

Context

A grid with locked columns renders each record in up to three bodies (start, center, end), and each body has its own role="row" per record. I found this while checking a blog claim about the grid's ARIA support (#20184). On the issues showcase, # and Title are locked at the start and State at the end. A DOM read on neomjs.com production on 2026-10-31 shows:

  • role="grid" carries aria-colcount="8" and aria-rowcount="498".
  • The header is three role="row" elements, all aria-rowindex="1". Their buttons carry aria-colindex 1, 2 | 1 to 5 | 1.
  • Every record is three role="row" elements, one per role="rowgroup" body, sharing one aria-rowindex. Their cells carry aria-colindex 1, 2 | 1 to 5 | 1. Three cells per record claim column 1, and columns 6 to 8 never appear.
  • src/grid and src/draggable/grid contain no aria-owns.

A single-region grid is correct. The bigData example (20,000 rows, 51 columns) has one rowgroup and global aria-colindex. Scrolled to its middle, its 32 DOM rows carry aria-rowindex 9,997 to 10,028.

The same showcase shows two structure problems that apply to any grid using these features:

  • The 13.3 search toolbar (a textbox and buttons) sits inside the role="grid" element.
  • The header menu triggers (for example "Filter Type") sit inside the header role="row" beside the role="columnheader" button, not inside a column header.

Checked and fine: the content-sized-rows measure layer (div.neo-grid-row-measure) is aria-hidden="true" and visibility: hidden.

How it happened: the grid's ARIA indices arrived with the buffered grid in January 2025 (#6175 aria-rowindex, #6176 aria-rowcount, #6187 aria-colindex), when a grid had one body, so counting within the body was counting within the grid. The locked-column regions came later (the Grid Multi-Body epic #9486; lockedStart lands in 0401f40ea0, 2026-03-16, #9457) and split the grid into up to three bodies, each still counting from 1. The operator confirmed the order: ARIA support came before locked columns.

The Problem

WAI-ARIA 1.2 rules these out:

  • aria-colindex "Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid". Authors MUST set it "greater than the aria-colindex value of any previous elements within the same row, and less than or equal to the number of columns in the full table."
  • For aria-rowindex, authors MUST set it "greater than the aria-rowindex value of any previous rows".
  • A row owns cell, columnheader, gridcell and rowheader. A grid owns row, directly or through rowgroup.

So a screen reader on a locked-column grid gets the wrong column position for every cell outside the start region. It sees each record as three rows, and it finds toolbar controls and menu buttons inside the grid's rows.

The Architectural Reality

  • Body cells: src/grid/Row.mjs:293 sets 'aria-colindex': columnIndex + 1, and columnIndex counts within the cell's region body (the class neo-locked-end-first-column is set when columnIndex === 0).
  • Header buttons: src/grid/header/Toolbar.mjs:283 and src/grid/header/Wrapper.mjs:149-150 number them per toolbar. Wrapper.mjs:141-142 says why: "Buttons carry a toolbar-local aria-colindex, which the header SortZone resolves column positions through at drag start". src/draggable/grid/header/toolbar/SortZone.mjs:178 and :519 read it back (me.dragElement['aria-colindex'] - 1), and :434 writes it.
  • src/grid/Container.mjs:1717 sets aria-colcount to columns.count, which counts every region. role: 'grid' (Container.mjs:200) sits on the container, which also holds searchToolbar_ (Container.mjs:164).
  • The region bodies pool rows in the same record order: rows with equal aria-rowindex across the three rowgroups show one record.

Design authority: WAI-ARIA 1.2 (quoted above), plus the grid's own global aria-colcount (Container.mjs:1717). The only record of the per-region index (Wrapper.mjs:141-142) names it SortZone's lookup channel, not ARIA intent.

The Fix

  1. Decouple SortZone from ARIA. SortZone resolves the dragged column from a non-ARIA source, such as the header item's index within its toolbar or its dataField, so the ARIA indices can be global.
  2. Global aria-colindex. Each region offsets its cells and header buttons by the column count of the regions before it: start 0, center the start count, end the start plus center counts.
  3. One ARIA row per record. Candidate: the first present region's row owns the other regions' cells for that record through aria-owns, and the other regions' rows take role="none". Owned elements follow the DOM children, so start → center → end order holds. The header rows get the same treatment. Pooled rows recycle in place, so each pool slot's ID list stays stable. Validate with a real screen reader before choosing. If aria-owns proves unreliable, record the result and the chosen alternative in the PR.
  4. Grid-owned structure only: moved to #20188. The search toolbar and the header menu triggers apply to every grid, not only locked ones, and the fix restructures the header element, so it has its own ticket.

Row ownership needs one more step. The start body renders before the other regions build their row pools, and a lead row whose record did not change skips its next render. So each sibling region re-syncs the lead rows' aria-owns after its own pass (Body#syncAriaRowOwns). Body#getRecordByRowId reads the row's own rowIndex, because rows outside the lead region carry no aria-rowindex.

Acceptance Criteria

  • On a grid with start and end locked columns, every cell's and header's aria-colindex equals its visual column position across regions (1 to N, with N = aria-colcount), unique within a row.
  • Column drag and drop, including across regions, works unchanged, and SortZone reads no ARIA attribute.
  • In the browser's accessibility tree, each record exposes one row with all its cells in visual order, and the header exposes one row. A spec covers it: Chromium's tree through CDP Accessibility.getFullAXTree on the issues showcase.
  • Single-region grids are unchanged: in bigData, aria-colindex stays global and aria-rowindex stays one per record.
  • Post-merge: a screen-reader read (VoiceOver with Safari, or NVDA with Firefox or Chrome) on the deployed issues showcase announces the right column header and position for a locked-start, a center and a locked-end cell.

Out of Scope

  • Keyboard navigation across split bodies (#9496).
  • Cross-window region detachment (#9493). When a region lives in another window, each window has its own ARIA tree; this ticket does not address it.
  • The Table (src/table), which uses one <table> with sticky locked cells.
  • The search toolbar and the header menu triggers inside the grid's rows (#20188).

Avoided Traps

  • One role="grid" per region. Each region's indices become valid, but a screen-reader user meets three grids for one table.
  • Keeping per-region numbering with a column count per rowgroup. aria-colcount belongs to the grid, not to rowgroups.
  • Reading layout back from ARIA. The SortZone coupling is how the per-region numbering became load-bearing. ARIA stays write-only for the engine.

Related

  • #9486, the open Grid Multi-Body epic. This is its missing accessibility leaf, not linked natively because the epic already holds 30 sub-issues.
  • #9496 (keyboard navigation across split bodies) and #9493 (region detachment).
  • #19886 and #19913 (aria-sort), #18864 (aria-readonly): earlier grid ARIA fixes.
  • #20184, the blog post whose ARIA paragraph surfaced this.

Live latest-open + closed sweep: checked the latest 20 open issues and a closed search (aria-colindex, aria-rowindex, aria locked, screen reader grid, role grid toolbar, columnheader button; #9496's body read) at 2026-10-31T14:37Z. No equivalent or prior exclusion found. MC sweep: "screen reader hears wrong column in grid with locked columns aria-colindex aria-rowindex split bodies", 6 results. No prior decision found; the prior art notes that header toolbar order follows creation order, not region order. Own-assignment sweep: 4 open, none overlapping. A2A claim sweep: the last 30 messages (13:59Z to 14:37Z) hold no grid ARIA claim.

unowned-rationale: Ready for a contributor or a grid maintainer. It needs a screen-reader read, so it is not labelled good first issue.

Origin Session ID: e8483c57-3c91-478e-9d75-75f40235f078 Retrieval Hint: "locked-column grid aria-colindex per region SortZone toolbar-local"

tobiu referenced in commit 1ebf3f9 - "fix(grid): one ARIA grid across locked regions (#20187) (#20189) on Oct 31, 2026, 5:43 PM
tobiu closed this issue on Oct 31, 2026, 5:43 PM
tobiu referenced in commit 69f8ef4 - "docs(blog): the main thread is the wrong place for a data grid (#20184) (#20186) on Oct 31, 2026, 6:02 PM