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 { .number-col {
width: 110px; white-space: nowrap;
} }
.folder-col { .folder-col {

View file

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

View file

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