File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
packages/main/src/components/AnalyticalTable Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ export const VirtualTableBody = (props: VirtualTableBodyProps) => {
152152 }
153153 prepareRow ( row ) ;
154154 const { key, ...rowProps } = row . getRowProps ( {
155- 'aria-rowindex' : virtualRow . index + 1 ,
155+ 'aria-rowindex' : virtualRow . index + 2 ,
156156 'data-virtual-row-index' : virtualRow . index ,
157157 } ) ;
158158 const isNavigatedCell = typeof markNavigatedRow === 'function' ? markNavigatedRow ( row ) : false ;
Original file line number Diff line number Diff line change @@ -121,24 +121,29 @@ const setHeaderProps = (
121121 }
122122
123123 if ( column . id === '__ui5wcr__internal_selection_column' ) {
124- updatedProps [ 'aria-label' ] += translatableTexts . selectionHeaderCellText ;
124+ updatedProps [ 'aria-label' ] += ' ' + translatableTexts . selectionHeaderCellText ;
125125 }
126126
127127 if ( column . id === '__ui5wcr__internal_highlight_column' ) {
128- updatedProps [ 'aria-label' ] += translatableTexts . highlightHeaderCellText ;
128+ updatedProps [ 'aria-label' ] += ' ' + translatableTexts . highlightHeaderCellText ;
129129 }
130130
131131 if ( column . id === '__ui5wcr__internal_navigation_column' ) {
132- updatedProps [ 'aria-label' ] += translatableTexts . navigationHeaderCellText ;
132+ updatedProps [ 'aria-label' ] += ' ' + translatableTexts . navigationHeaderCellText ;
133133 }
134134
135135 updatedProps [ 'aria-label' ] ||= undefined ;
136136
137137 return [ headerProps , { isFiltered, ...updatedProps } ] ;
138138} ;
139139
140+ const setHeaderGroupProps = ( props ) => {
141+ return [ props , { 'aria-rowindex' : 1 } ] ;
142+ } ;
143+
140144export const useA11y = ( hooks : ReactTableHooks ) => {
141145 hooks . getCellProps . push ( setCellProps ) ;
142146 hooks . getHeaderProps . push ( setHeaderProps ) ;
147+ hooks . getHeaderGroupProps . push ( setHeaderGroupProps ) ;
143148} ;
144149useA11y . pluginName = 'useA11y' ;
You can’t perform that action at this time.
0 commit comments