File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,16 @@ def announceSelectionChange(self):
208208
209209 def _get_cellCoordsText (self ):
210210 if self .hasSelection and controlTypes .State .FOCUSED in self .states :
211+ count = self .table .IAccessibleTable2Object .nSelectedCells
212+ if count == self .table .childCount :
213+ return _ ('all cells' )
214+
215+ if count > 2000 :
216+ # only report number of cells, retrieving a11y objects for all cells
217+ # by calling IAccessibleTable2's 'reportedCells' method may take a long time
218+ print ('too many cells selected: {}' .format (count ))
219+ return _ ('{count} cells' ).format (count = count )
220+
211221 selected , count = self .table .IAccessibleTable2Object .selectedCells
212222 firstAccessible = selected [0 ].QueryInterface (IA2 .IAccessible2 )
213223 firstAddress = firstAccessible .accName (0 )
You can’t perform that action at this time.
0 commit comments