Skip to content

Commit 3b478fa

Browse files
marcelo-portugalmportuga
authored andcommitted
fix: 🐛 ensure select all checkbox is announced correctly
Select All Checkbox needs a label and state to be announced by screen readers.
1 parent f9a84ff commit 3b478fa

File tree

9 files changed

+25
-2
lines changed

9 files changed

+25
-2
lines changed

packages/core/src/js/en.js

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
previous: 'Previous Page',
3737
last: 'Last Page'
3838
},
39+
selection: {
40+
selectAll: 'Select All'
41+
},
3942
menu: {
4043
text: 'Choose Columns:'
4144
},

packages/i18n/src/js/es-ct.js

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
previous: 'Pàgina Anterior',
3434
last: 'Última Pàgina'
3535
},
36+
selection: {
37+
selectAll: 'Seleccionar Todo'
38+
},
3639
menu: {
3740
text: 'Triar Columnes:'
3841
},

packages/i18n/src/js/es.js

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
previous: 'Página Anterior',
2020
last: 'Última Página'
2121
},
22+
selection: {
23+
selectAll: 'Seleccionar Todo'
24+
},
2225
menu: {
2326
text: 'Elegir columnas:'
2427
},

packages/i18n/src/js/fr.js

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
previous: 'Page précédente',
2929
last: 'Dernière page'
3030
},
31+
selection: {
32+
selectAll: 'Tout Sélectionner'
33+
},
3134
menu: {
3235
text: 'Choisir des colonnes :'
3336
},

packages/i18n/src/js/it.js

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
previous: 'Precedente',
2323
last: 'Ultima'
2424
},
25+
selection: {
26+
selectAll: 'Seleziona Tutto'
27+
},
2528
menu: {
2629
text: 'Scegli le colonne:'
2730
},

packages/i18n/src/js/pt-br.js

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
previous: 'Página Anterior',
3737
last: 'Última Página'
3838
},
39+
selection: {
40+
selectAll: 'Selecionar Tudo'
41+
},
3942
menu: {
4043
text: 'Selecione as colunas:'
4144
},

packages/i18n/src/js/pt.js

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
previous: 'Página Anterior',
3434
last: 'Última Página'
3535
},
36+
selection: {
37+
selectAll: 'Selecionar Tudo'
38+
},
3639
menu: {
3740
text: 'Selecione as colunas:'
3841
},

packages/selection/src/templates/selectionSelectAllButtons.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<div
2-
role="button"
2+
role="checkbox"
33
tabindex="0"
44
class="ui-grid-selection-row-header-buttons ui-grid-icon-ok"
5+
ui-grid-one-bind-aria-label="'selection.selectAll' | t"
6+
aria-checked="{{grid.selection.selectAll}}"
57
ng-class="{'ui-grid-all-selected': grid.selection.selectAll}"
68
ng-click="headerButtonClick($event)"
79
ng-keydown="headerButtonKeyDown($event)">

packages/selection/test/uiGridSelectionSelectAllButtonsDirective.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('ui.grid.selection uiGridSelectionSelectAllButtons', function() {
5353
it('should render the select all button', function() {
5454
expect(selectAllButton.hasClass('ui-grid-selection-row-header-buttons')).toBe(true);
5555
expect(selectAllButton.hasClass('ui-grid-icon-ok')).toBe(true);
56-
expect(selectAllButton.attr('role')).toBe('button');
56+
expect(selectAllButton.attr('role')).toBe('checkbox');
5757
});
5858
function testHeaderButtonAction(triggerAction) {
5959
describe('when all of the rows are already selected', function() {

0 commit comments

Comments
 (0)