Skip to content

Commit 2c47b86

Browse files
committed
fix(a11y): wizard, sessions, habilitations — h1, tableau, couleur statut, DataPass (NC 3.1, 5.3, 9.1, 13.2)
- sessions/_new: h2 → h1 class="fr-h2" (NC 9.1) + fr-sr-only sur lien ProConnect (NC 13.2) - wizard/_header: h2 → h1 class="fr-h2" (NC 9.1) + fr-sr-only sur lien DataPass (NC 13.2) - wizard/contacts: h4 → h3 (hiérarchie correcte sous h1) (NC 9.1) - wizard/prolonged: h3.fr-alert__title → p.fr-alert__title (NC 9.1) - wizard/owner + authorization_requests/_header: fr-sr-only sur liens DataPass (NC 13.2) - authorization_requests/show: caption tableau + h2 contact_technique → h3 (NC 5.3, 9.1) - pages/current_status: aria-hidden sur cercle + fr-sr-only statut textuel (NC 3.1, 13.2) Partially solves API-6952
1 parent fe59fe4 commit 2c47b86

8 files changed

Lines changed: 22 additions & 17 deletions

File tree

site/app/views/shared/authorization_requests/_header.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<b><%= t('.delivered_at', humanized_date: friendly_format_from_timestamp(authorization_request.created_at)) %></b>
1414
-
1515
<% if to_datapass %>
16-
<%= link_to t('shared.links.to_datapass', external_id: authorization_request.external_id).html_safe,
16+
<%= link_to (t('shared.links.to_datapass', external_id: authorization_request.external_id) + content_tag(:span, ' (nouvelle fenêtre)', class: 'fr-sr-only')).html_safe,
1717
datapass_authorization_request_url(authorization_request),
1818
id: :authorization_request_link,
1919
class: %w(fr-link fr-text--xs),

site/app/views/shared/authorization_requests/show.html.erb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
<div class="fr-collapse" id="accordion-106"/>
122122
<div class="fr-table fr-table--bordered fr-table--layout-fixed fr-m-0 fr-p-0">
123123
<table>
124+
<caption class="fr-sr-only"><%= t('.other_tokens.title') %></caption>
124125
<thead>
125126
<tr>
126127
<th scope="col"><%= t('.other_tokens.table.identifier')%></th>
@@ -231,10 +232,10 @@
231232
<% end %>
232233
<% if @authorization_request.contact_technique.present? %>
233234
<div id="contact_technique" class="fr-col-12 fr-col-md-6 fr-col-lg-4 fr-mb-16v">
234-
<h2 class="fr-h6">
235+
<h3 class="fr-h6">
235236
<i class="fr-icon fr-icon-user-star-line fr-mr-1v" aria-hidden="true"></i>
236237
<%= t('.contacts.contact_technique.title').html_safe %>
237-
</h2>
238+
</h3>
238239
<div class="fr-card">
239240
<% if @authorization_request.contact_technique == current_user %>
240241
<div class="fr-card__header">
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<turbo-frame id="current_status">
22
<a class="fr-link" href="https://status.<%= namespace == 'api_entreprise' ? 'entreprise' : 'particulier' %>.api.gouv.fr" title="API <%= namespace.humanize %> Status Page" target="_blank">
3-
<span class="circle circle-<%= status_to_color(@current_status) %> fr-mr-1w"></span> <%= t('.title') %>
3+
<span class="circle circle-<%= status_to_color(@current_status) %> fr-mr-1w" aria-hidden="true"></span>
4+
<span class="fr-sr-only"><%= @current_status %></span>
5+
<%= t('.title') %>
6+
<span class="fr-sr-only">(nouvelle fenêtre)</span>
47
</a>
58
</turbo-frame>

site/app/views/shared/prolong_token_wizard/build/_header.html.erb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<div class="fr-pb-4v">
2-
<h2>
2+
<h1 class="fr-h2">
33
<%= t('shared.prolong_token_wizard.header.title') %>
4-
</h2>
4+
</h1>
55
<p>
66
<%= t(
77
'shared.prolong_token_wizard.header.description',
88
humanize_date: friendly_format_from_timestamp(prolong_token_wizard.token.exp),
99
link_to_datapass: link_to(
10-
t('shared.links.to_datapass', external_id: prolong_token_wizard.token.authorization_request.external_id).html_safe,
11-
datapass_authorization_request_url(prolong_token_wizard.token.authorization_request),
10+
(t('shared.links.to_datapass', external_id: prolong_token_wizard.token.authorization_request.external_id) + content_tag(:span, ' (nouvelle fenêtre)', class: 'fr-sr-only')).html_safe,
11+
datapass_authorization_request_url(prolong_token_wizard.token.authorization_request),
1212
id: :authorization_request_link,
13-
class: %w(fr-link),
13+
class: %w(fr-link),
1414
target: '_blank'
15-
).html_safe,
15+
).html_safe,
1616
api: t("#{namespace}.api"),
1717
api_name: t("#{namespace}.name")
1818
).html_safe

site/app/views/shared/prolong_token_wizard/contacts.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<div class="fr-p-4v" style="background-color: var(--background-default-grey)">
44
<%= render partial: 'shared/prolong_token_wizard/build/stepper', locals: { prolong_token_wizard: @prolong_token_wizard } %>
55
<%= form_for @prolong_token_wizard, url: wizard_path, method: :put do |f| %>
6-
<h4>
6+
<h3>
77
<%= t('.subtitle') %>
8-
</h4>
8+
</h3>
99

1010
<% if @prolong_token_wizard.authorization_request.api == 'particulier' %>
1111
<div class="fr-fieldset__element">

site/app/views/shared/prolong_token_wizard/owner.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<%= f.label :owner,
99
t('.label',
1010
link_to_datapass: link_to(
11-
t('shared.links.to_datapass', external_id: @prolong_token_wizard.token.authorization_request.external_id).html_safe,
11+
(t('shared.links.to_datapass', external_id: @prolong_token_wizard.token.authorization_request.external_id) + content_tag(:span, ' (nouvelle fenêtre)', class: 'fr-sr-only')).html_safe,
1212
datapass_authorization_request_url(@prolong_token_wizard.token.authorization_request),
1313
id: :authorization_request_link,
1414
class: %w(fr-link),

site/app/views/shared/prolong_token_wizard/prolonged.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="fr-alert fr-alert--success">
2-
<h3 class="fr-alert__title"><%= t('.title', humanized_date: friendly_format_from_timestamp(@prolong_token_wizard.token.exp)) %></h3>
2+
<p class="fr-alert__title"><%= t('.title', humanized_date: friendly_format_from_timestamp(@prolong_token_wizard.token.exp)) %></p>
33
<p><%= t('.description', api_name: t("#{namespace}.name")) %></p>
44
</div>
55

site/app/views/shared/sessions/_new.html.erb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<h2 class="center">
1+
<h1 class="center fr-h2">
22
<%= t('.title').html_safe %>
3-
</h2>
3+
</h1>
44

55
<div class="fr-container">
66
<div class="fr-grid-row">
@@ -12,8 +12,9 @@
1212
<span class="fr-connect__brand">ProConnect</span>
1313
<% end %>
1414
<p>
15-
<a href="https://www.proconnect.gouv.fr/" target="_blank" rel="noopener" title="Qu’est-ce que ProConnect ? - Nouvelle fenêtre">
15+
<a href="https://www.proconnect.gouv.fr/" target="_blank" rel="noopener">
1616
Qu’est-ce que ProConnect ?
17+
<span class="fr-sr-only">(nouvelle fenêtre)</span>
1718
</a>
1819
</p>
1920
<% end %>

0 commit comments

Comments
 (0)