Hide pesudo-element content from assistive technologies

This commit is contained in:
Corinne Durrmeyer 2024-10-15 17:12:53 +02:00
parent 48f1cd4a4a
commit 4e64eb1af5
No known key found for this signature in database
GPG key ID: DDC049DDA35585B6
8 changed files with 8 additions and 8 deletions

View file

@ -151,10 +151,8 @@
.dropdown-button {
white-space: nowrap;
&::after {
[aria-hidden="true"].fr-ml-2v::after {
content: "";
margin-left: $default-spacer;
font-weight: bold;
}
&.icon-only {

View file

@ -13,6 +13,7 @@
-# Dropdown button title
%button#batch_operation_others.fr-btn.fr-btn--sm.fr-btn--secondary.fr-ml-1w.dropdown-button{ disabled: true, data: { menu_button_target: 'button', batch_operation_target: 'dropdown' } }
= t('.operations.other')
%span.fr-ml-2v{ 'aria-hidden': 'true' }
#state-menu.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, "aria-labelledby" => "batch_operation_others" }
%ul.dropdown-items

View file

@ -1,6 +1,7 @@
= content_tag(@wrapper, wrapper_options) do
%button{ class: button_class_names, id: button_id, disabled: disabled?, data: data, "aria-expanded": "false", 'aria-haspopup': 'true', 'aria-controls': menu_id }
= button_inner_html
%span.fr-ml-2v{ 'aria-hidden': 'true' }
%div{ data: { menu_button_target: 'menu' }, id: menu_id, 'aria-labelledby': button_id, role: menu_role, 'tabindex': -1, class: menu_class_names }
= menu_header_html

View file

@ -53,7 +53,7 @@
= render partial: 'shared/help/help_dropdown_instructeur'
- else
-# NB: on mobile in order to have links correctly aligned, we need a left icon #
= link_to t('help'), t("links.common.faq.url"), class: 'fr-btn dropdown-button'
= link_to t('help'), t("links.common.faq.url"), class: 'fr-btn'

View file

@ -2109,7 +2109,7 @@
<li>
<!-- / NB: on mobile in order to have links correctly aligned, we need a left icon -->
<a
class="fr-btn dropdown-button"
class="fr-btn"
href="/faq"
>Aide</a
>

View file

@ -2108,7 +2108,7 @@
<li>
<!-- / NB: on mobile in order to have links correctly aligned, we need a left icon -->
<a
class="fr-btn dropdown-button"
class="fr-btn"
href="/faq"
>Aide</a
>

View file

@ -2108,7 +2108,7 @@
<li>
<!-- / NB: on mobile in order to have links correctly aligned, we need a left icon -->
<a
class="fr-btn dropdown-button"
class="fr-btn"
href="/faq"
>Aide</a
>

View file

@ -2108,7 +2108,7 @@
<li>
<!-- / NB: on mobile in order to have links correctly aligned, we need a left icon -->
<a
class="fr-btn dropdown-button"
class="fr-btn"
href="/faq"
>Aide</a
>