fix(a11y/search): table th/td associations (critère 5.7)

Closes #8094
This commit is contained in:
Colin Darie 2022-11-29 17:21:50 +01:00
parent 3a2fae9cc2
commit 80106bf4e6
3 changed files with 10 additions and 9 deletions

View file

@ -51,7 +51,7 @@
}
.number-col {
width: 110px;
white-space: nowrap;
}
.folder-col {

View file

@ -9,7 +9,8 @@
border-top: 1px solid $border-grey;
}
td {
td,
th[scope="row"] {
@include vertical-padding($default-spacer);
vertical-align: middle;
}

View file

@ -2,17 +2,17 @@
%table.table.dossiers-table.hoverable
%thead
%tr
%th.number-col= t('views.users.dossiers.dossiers_list.n_dossier')
%th= t('views.users.dossiers.dossiers_list.procedure')
%th.number-col{ scope: :col }= t('views.users.dossiers.dossiers_list.n_dossier')
%th{ scope: :col }= t('views.users.dossiers.dossiers_list.procedure')
- if dossiers.present?
%th= t('views.users.dossiers.dossiers_list.requester')
%th.status-col= t('views.users.dossiers.dossiers_list.status')
%th.updated-at-col= t('views.users.dossiers.dossiers_list.updated')
%th.sr-only= t('views.users.dossiers.dossiers_list.actions')
%th{ scope: :col }= t('views.users.dossiers.dossiers_list.requester')
%th.status-col{ scope: :col }= t('views.users.dossiers.dossiers_list.status')
%th.updated-at-col{ scope: :col }= t('views.users.dossiers.dossiers_list.updated')
%th.sr-only{ scope: :col }= t('views.users.dossiers.dossiers_list.actions')
%tbody
- dossiers.each do |dossier|
%tr{ data: { 'dossier-id': dossier.id } }
%td.number-col
%th.number-col{ scope: :row }
= link_to(url_for_dossier(dossier), class: 'cell-link', tabindex: -1) do
%span.icon.folder
= dossier.id