Context
Found while adding specs for #635.
AbstractRow._setRowHeaders (src/ui-kit/experimental/aria/abstract-grid/abstract-row.ts) does:
private _setRowHeaders(cells: AbstractCell[], role: CellRole): void {
if (role === "rowheader") {
this.rowheaders.concat(cells);
} else if (role === "columnheader") {
this.columnheaders.concat(cells);
} else {
return;
}
}
Array.prototype.concat returns a new array rather than mutating in place, and the result is discarded here. So the public rowheaders/columnheaders properties on AbstractRow are always empty, regardless of the row's actual DOM content — only the flattened cells collection reflects reality.
Suggested fix
Assign the result, e.g. this.rowheaders = this.rowheaders.concat(cells);, and add spec coverage asserting the header collections are populated correctly.
Origin
Flagged by Copilot review on PR #654 (#654 (comment)). Left out of that PR since it is a spec-only PR and this is a pre-existing implementation bug.
Context
Found while adding specs for #635.
AbstractRow._setRowHeaders(src/ui-kit/experimental/aria/abstract-grid/abstract-row.ts) does:Array.prototype.concatreturns a new array rather than mutating in place, and the result is discarded here. So the publicrowheaders/columnheadersproperties onAbstractRoware always empty, regardless of the row's actual DOM content — only the flattenedcellscollection reflects reality.Suggested fix
Assign the result, e.g.
this.rowheaders = this.rowheaders.concat(cells);, and add spec coverage asserting the header collections are populated correctly.Origin
Flagged by Copilot review on PR #654 (#654 (comment)). Left out of that PR since it is a spec-only PR and this is a pre-existing implementation bug.