Skip to content

Commit

Permalink
a11y: version navigables au clavier
Browse files Browse the repository at this point in the history
  • Loading branch information
thom4parisot committed May 21, 2024
1 parent b6ed1c2 commit 874baaf
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions src/pages/exploitations/[numeroBio]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,28 @@ meta:
<thead>
<tr class="column-headers fr-sr-only">
<th></th>
<th>Nom de version</th>
<th>Date d'audit</th>
<th>Surface</th>
<th>Nombre de parcelles</th>
<th>Statut</th>
<th scope="col">Nom de version</th>
<th scope="col">Date d'audit</th>
<th scope="col">Surface</th>
<th scope="col">Nombre de parcelles</th>
<th scope="col">Statut</th>
<th></th>
<th></th>
</tr>
</thead>
<tr
v-for="record in records"
:key="record?.record_id"
class="version-row"
:class="{ 'version-row--disabled': !isOnline && !storage.records[record.record_id] }"
class="version-row fr-enlarge-link"
:class="{ 'version-row--disabled': !isOnline && !record.storedOffline }"
role="link"
@click="(isOnline || storage.records[record.record_id]) && $router.push(`/exploitations/${operatorStore.operator.numeroBio}/${record.record_id}`)"
>
<td></td>
<td><b class="fr-no">{{ record.version_name }}</b></td>
<th scope="row">
<router-link class="fr-text" :disabled="!isOnline && !record.storedOffline" :to="`/exploitations/${operatorStore.operator.numeroBio}/${record.record_id}`">
{{ record.version_name }}
</router-link>
</th>
<td>{{ record.audit_date ? dateFormat(record.audit_date) : 'non audité' }}</td>
<td>{{ inHa(record.surface) }} ha</td>
<td>{{ record.parcelles }}</td>
Expand All @@ -138,6 +141,7 @@ meta:
type="button"
class="fr-btn fr-btn--tertiary-no-outline fr-icon-download-line"
title="Télécharger en hors-ligne"
:disabled="!isOnline"
@click.stop.prevent="tryDownloadRecord(record.record_id)"
>Télécharger en hors-ligne</button>
</td>
Expand Down Expand Up @@ -357,6 +361,13 @@ col.actions {
}
}
tr.fr-enlarge-link {
:deep(button) {
position: relative;
z-index: 10;
}
}
tr.version-row,
tr.version-row:nth-child(2n) {
cursor: pointer;
Expand Down

0 comments on commit 874baaf

Please sign in to comment.