@@ -3733,7 +3733,8 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
37333733 // (`GridCellSelection.describeCell`), for its `aria-readonly`. Asked as a
37343734 // cell becomes selected, and again only when what the answer reads changes:
37353735 // the row is re-read, or the host hands the grid a new value (an answer it
3736- // was waiting on arrived). Never asked per render; every render reads this.
3736+ // was waiting on arrived). Not asked per render (a host keeps its value
3737+ // stable: `GridCellSelection.describeCell`); every render reads this.
37373738 const selectedRow = selectedPos ? paginatedData [ selectedPos . rowIndex ] : undefined ;
37383739 const selectedColumnKey = selectedPos ? columns [ selectedPos . colIndex ] . accessorKey : undefined ;
37393740 const [ selectedHostReadOnly , setSelectedHostReadOnly ] = useState < { row : unknown ; columnKey : string } | null > ( null ) ;
@@ -5275,7 +5276,7 @@ const DataTableRenderer = ({ schema }: { schema: DataTableSchema }) => {
52755276 // objectstack#35689 — a read-only cell says so to assistive tech, in the
52765277 // grid only, from the table's own facts. The selected cell (the one a
52775278 // reader moves to) adds the host's, asked when it became selected
5278- // (`selectedHostReadOnly`: `describeCell` is never asked per render).
5279+ // (`selectedHostReadOnly`: `describeCell` is not asked per render).
52795280 const cellReadOnly = keyboardNavigation
52805281 && ( ! isEditable || ( isSelectedCell && selectedHostReadOnly !== null
52815282 && selectedHostReadOnly . row === row && selectedHostReadOnly . columnKey === col . accessorKey ) ) ;
0 commit comments