fix(a11y): add aria to tabs
This commit is contained in:
parent
d15b85633a
commit
7f0dde9be4
14 changed files with 141 additions and 130 deletions
|
@ -2,14 +2,15 @@
|
|||
.container
|
||||
%h1.page-title Prévisualisation de la démarche « #{@dossier.procedure.libelle} »
|
||||
|
||||
%ul.tabs
|
||||
= tab_item('le dossier',
|
||||
apercu_admin_procedure_path(@dossier.procedure, tab: 'dossier'),
|
||||
active: @tab == 'dossier')
|
||||
- if @dossier.champs_private.size > 0
|
||||
= tab_item('les annotations privées',
|
||||
apercu_admin_procedure_path(@dossier.procedure, tab: 'annotations-privees'),
|
||||
active: @tab == 'annotations-privees')
|
||||
%nav.tabs
|
||||
%ul
|
||||
= tab_item('le dossier',
|
||||
apercu_admin_procedure_path(@dossier.procedure, tab: 'dossier'),
|
||||
active: @tab == 'dossier')
|
||||
- if @dossier.champs_private.size > 0
|
||||
= tab_item('les annotations privées',
|
||||
apercu_admin_procedure_path(@dossier.procedure, tab: 'annotations-privees'),
|
||||
active: @tab == 'annotations-privees')
|
||||
|
||||
- if @tab == 'dossier'
|
||||
= render partial: "shared/dossiers/edit", locals: { dossier: @dossier, apercu: true }
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
= link_to "Nouvelle Démarche", new_from_existing_admin_procedures_path, id: 'new-procedure', class: 'button primary'
|
||||
.container
|
||||
|
||||
%ul.tabs
|
||||
= tab_item(t('pluralize.published', count: @procedures_publiees.count), admin_procedures_path(statut: 'publiees'), active: @statut == 'publiees', badge: number_with_html_delimiter(@procedures_publiees_count))
|
||||
= tab_item('En test', admin_procedures_path(statut: 'brouillons'), active: @statut == 'brouillons', badge: number_with_html_delimiter(@procedures_draft_count))
|
||||
= tab_item(t('pluralize.closed', count: @procedures_closed.count), admin_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closed_count))
|
||||
%nav.tabs
|
||||
%ul
|
||||
= tab_item(t('pluralize.published', count: @procedures_publiees.count), admin_procedures_path(statut: 'publiees'), active: @statut == 'publiees', badge: number_with_html_delimiter(@procedures_publiees_count))
|
||||
= tab_item('En test', admin_procedures_path(statut: 'brouillons'), active: @statut == 'brouillons', badge: number_with_html_delimiter(@procedures_draft_count))
|
||||
= tab_item(t('pluralize.closed', count: @procedures_closed.count), admin_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closed_count))
|
||||
|
||||
.container#procedures{ data: { item_count: @statut === "publiees" ? @procedures_publiees_count : @statut === "brouillons" ? @procedures_draft_count : @procedures_closed_count } }
|
||||
- if @statut === "publiees"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue