File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
front_end/ui/legacy/components/data_grid Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ const UIStrings = {
105105 *@description Accessible text indicating an empty row is created.
106106 */
107107 emptyRowCreated : 'An empty table row has been created. You may double click or use context menu to edit.' ,
108+ /**
109+ *@description Text for screen reader to announce when focusing on a sortable column in data grid.
110+ *@example {ascending} PH1
111+ */
112+ enterToSort : 'Column sort state: {PH1}. Press enter to apply sorting filter' ,
108113} ;
109114const str_ = i18n . i18n . registerUIStrings ( 'ui/legacy/components/data_grid/DataGrid.ts' , UIStrings ) ;
110115const i18nString = i18n . i18n . getLocalizedString . bind ( undefined , str_ ) ;
@@ -1317,6 +1322,7 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
13171322 cell . classList . add ( sortOrder ) ;
13181323 const ariaLabel = this . isSortOrderAscending ( ) ? 'ascending' : 'descending' ;
13191324 cell . setAttribute ( 'aria-sort' , ariaLabel ) ;
1325+ UI . ARIAUtils . alert ( i18nString ( UIStrings . enterToSort , { PH1 : ariaLabel || '' } ) ) ;
13201326
13211327 this . dispatchEventToListeners ( Events . SORTING_CHANGED ) ;
13221328 }
You can’t perform that action at this time.
0 commit comments