@@ -9,6 +9,7 @@ QUnit.testStart(function() {
99
1010import 'ui/tree_view' ;
1111import { EXPANDER_ICON_STUB_CLASS } from '__internal/ui/tree_view/m_tree_view.base' ;
12+ import localization from 'localization' ;
1213
1314const WIDGET_CLASS = 'dx-treeview' ;
1415const NODE_CONTAINER_CLASS = 'dx-treeview-node-container' ;
@@ -75,6 +76,30 @@ QUnit.module('aria accessibility', {
7576 assert . equal ( $node2 . attr ( 'aria-label' ) , 'Item 11' , 'label for 2nd ite is correct' ) ;
7677 } ) ;
7778
79+ QUnit . test ( 'aria-label for selectAll checkbox should be localized (T1299342)' , function ( assert ) {
80+ assert . expect ( 1 ) ;
81+
82+ const defaultLocale = localization . locale ( ) ;
83+ const localizedSelectAllText = 'Alles auswählen' ;
84+
85+ try {
86+ localization . loadMessages ( {
87+ 'de' : { 'dxList-selectAll' : localizedSelectAllText }
88+ } ) ;
89+ localization . locale ( 'de' ) ;
90+
91+ this . instance . option ( { showCheckBoxesMode : 'selectAll' } ) ;
92+
93+ const $selectAllItem = this . $element . find ( `.${ SELECT_ALL_ITEM_CLASS } ` ) ;
94+
95+ assert . strictEqual ( $selectAllItem . attr ( 'aria-label' ) , localizedSelectAllText , 'selectAll checkbox aria-label is localized' ) ;
96+ } finally {
97+ localization . locale ( defaultLocale ) ;
98+ }
99+
100+
101+ } ) ;
102+
78103 QUnit . test ( 'aria role for item levels' , function ( assert ) {
79104 const $node = this . $element . find ( '.' + NODE_CONTAINER_CLASS ) ;
80105 assert . equal ( $node . attr ( 'role' ) , 'group' , 'role is correct' ) ;
0 commit comments