-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(logo): évite les arrêts de vocalisation de lecteurs d'écrans
Actuellement on utilise des `<br>` dans les logos pour que "République Française" ou autres termes s'affichent bien visuellement. Par défaut, un lecteur d'écran peut avoir tendance à arrêter la lecture après un `<br>`. C'est le comportement normal, c'est ce qu'on veut habituellement : il s'arrête pour marquer un passage à la ligne. Cependant ici ça serait mieux que le lecteur ne s'arrête pas, le br étant utilisé uniquement pour l'aspect layout. Masquer ces `<br>` de l'arbre d'accessibilité permet de rendre la vocalisation plus fluide (plus d'arrêts à cause des br) tout en gardant l'impact visuel. Note : dans certains usages du logo, le problème n'était pas présent (le dom n'est pas tout à fait le même sur un "header minimal" et un "header sans navigation" par exemple). Cependant j'ai trouvé ça pas plus mal de garder cette idée de aria-hidden partout afin que tout copié/collé rapide du DSFR fonctionne. Signed-off-by: Emmanuel Pelletier <manu@habite.la>
- Loading branch information
1 parent
0872677
commit 8d1f375
Showing
18 changed files
with
37 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<% const sample = getSample(include); %> | ||
|
||
<div class="<%= prefix %>-container" > | ||
<%- sample('En-tête', '../../../../component/header/example/sample/header.ejs', {header: { id: uniqueId('header'), logo:{ title: 'République<br>Française'}, operator: imgData('img/placeholder.16x9.png', 'rendered', null, null, 'max-width:9.0625rem;'), service: true, links:true, search: true, navigation: 'min' }}); %> | ||
<%- sample('En-tête', '../../../../component/header/example/sample/header.ejs', {header: { id: uniqueId('header'), logo:{ title: 'République<br aria-hidden="true">Française'}, operator: imgData('img/placeholder.16x9.png', 'rendered', null, null, 'max-width:9.0625rem;'), service: true, links:true, search: true, navigation: 'min' }}); %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%- include('./logo', {logo: { title: 'Ministère<br>de l’europe<br>et des affaires<br>étrangères'}});%> | ||
<%- include('./logo', {logo: { title: 'Ministère<br aria-hidden="true">de l’europe<br aria-hidden="true">et des affaires<br aria-hidden="true">étrangères'}});%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%- include('./logo', {logo: { title: 'Ministère<br>de la transition<br>écologique<br>et solidaire'}});%> | ||
<%- include('./logo', {logo: { title: 'Ministère<br aria-hidden="true">de la transition<br aria-hidden="true">écologique<br aria-hidden="true">et solidaire'}});%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%- include('./logo', {logo: { title: 'Secrétaire d’État<br>chargé(e) de<br>l’égalité entre les<br>femmes et les<br>hommes et de la<br>lutte contre les<br>discriminations'} });%> | ||
<%- include('./logo', {logo: { title: 'Secrétaire d’État<br aria-hidden="true">chargé(e) de<br aria-hidden="true">l’égalité entre les<br aria-hidden="true">femmes et les<br aria-hidden="true">hommes et de la<br aria-hidden="true">lutte contre les<br aria-hidden="true">discriminations'} });%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<%- include('./sample/skiplinks'); %> | ||
<%- include('../../header/example/sample/header.ejs', { header : { logo:{ title: 'Intitulé<br>officiel'}, service:true, links:true, search: true, search: { modalId: 'header-search', input: {placeholder: 'Rechercher', label:'Rechercher'}, button: {id: uniqueId('search-btn'), label: 'Rechercher', title: 'Rechercher', modalId: 'header-search'}}, navigation: true, menu: { modalId: 'header-navigation' }}}); %> | ||
<%- include('../../header/example/sample/header.ejs', { header : { logo:{ title: 'Intitulé<br aria-hidden="true">officiel'}, service:true, links:true, search: true, search: { modalId: 'header-search', input: {placeholder: 'Rechercher', label:'Rechercher'}, button: {id: uniqueId('search-btn'), label: 'Rechercher', title: 'Rechercher', modalId: 'header-search'}}, navigation: true, menu: { modalId: 'header-navigation' }}}); %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters