Skip to content

Commit

Permalink
Merge pull request #958 from plone/ionlizarazu-a11y-table-select-all
Browse files Browse the repository at this point in the history
add a label to the select all checkbox and to each of the items in th…
  • Loading branch information
jensens authored Apr 10, 2020
2 parents 5f006ff + 777cc0c commit 65b92f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mockup/patterns/structure/templates/table.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
data-pat-datatables="<%- datatables_options %>">
<thead>
<tr>
<th class="selection"><input type="checkbox" class="select-all" /></th>
<th class="selection"><label for="selectAllInputCheckbox" class="hiddenStructure" aria-label="<%- _t('Select all') %>"><%- _t('Select all') %></label><input id="selectAllInputCheckbox" type="checkbox" class="select-all" /></th>
<th class="title"><%- _t('Title') %></th>
<% _.each(activeColumns, function(column){ %>
<% if(column !== 'Description' && _.has(availableColumns, column)) { %>
Expand Down
2 changes: 1 addition & 1 deletion mockup/patterns/structure/templates/tablerow.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<td class="selection" data-order="<%- attributes['_sort'] %>"><input type="checkbox" <% if(selected){ %> checked="checked" <% } %>/></td>
<td class="selection" data-order="<%- attributes['_sort'] %>"><label for="select<%- attributes['_sort'] %>InputCheckbox" class="hiddenStructure" aria-label="<%- _t('Select') %>"><%- _t('Select') %></label><input id="select<%- attributes['_sort'] %>InputCheckbox" <% if(selected){ %> checked="checked" <% } %> type="checkbox"/></td>

<td class="title">
<div class="pull-left">
Expand Down
3 changes: 3 additions & 0 deletions news/957.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add a label to the select all checkbox and to each of the items in the table to make the table more accessible
[erral & ionlizarazu]

0 comments on commit 65b92f2

Please sign in to comment.