Skip to content

Commit

Permalink
fix(orange navbar): languages selection aria-label improvement for …
Browse files Browse the repository at this point in the history
…a11y (#1629)

Co-authored-by: Julien Déramond <julien.deramond@orange.com>
  • Loading branch information
MewenLeHo and julien-deramond authored Nov 16, 2022
1 parent 86dfb2c commit 945d22f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
6 changes: 3 additions & 3 deletions site/content/docs/5.2/components/orange-navbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ An additional navbar (with text or icon items) can be added on the right of the

<!-- Right navbar of the Supra bar -->
<ul class="navbar-nav border-top border-1 border-dark d-flex flex-row d-lg-none">
<li class="nav-item"><a class="nav-link active" href="#" aria-label="English version">EN</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="Version française" lang="fr" hreflang="fr">FR</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="Versión en español" lang="es" hreflang="es">ES</a></li>
<li class="nav-item"><a class="nav-link active" href="#" aria-label="EN English version">EN</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="FR Version française" lang="fr" hreflang="fr">FR</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="ES Versión en español" lang="es" hreflang="es">ES</a></li>
</ul>
</div>

Expand Down
7 changes: 7 additions & 0 deletions site/content/docs/5.2/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ If you need more details about the changes, please refer to the [v5.2.2 release]
- **Modals**
- <span class="badge bg-warning">Warning</span> Modals markups have changed to show that a modal dialog represents its own separate document/context, so most of the `.modal-title`s are now `<h1>`s associated with a `.h*`. Please reflect this modification into your websites by choosing the right header level.

- **Orange navbar**
- Languages selection's `aria-label`s have been slightly changed in some supra bars examples for accessibility purpose; visible name must be included in the accessible name. It might be a useful modification to propagate into your websites if you have this same kind of languages selection.
```diff
- <li class="nav-item"><a class="nav-link active" href="#" aria-label="English version">EN</a></li>
+ <li class="nav-item"><a class="nav-link active" href="#" aria-label="EN English version">EN</a></li>
```

### Forms

- <span class="badge bg-warning">Warning</span> All forms examples have been modified to add a `.mt-2` to all submit buttons in order to always have 30px between the last form control and the button. Please reflect this modification into your websites.
Expand Down
12 changes: 6 additions & 6 deletions site/layouts/shortcodes/orange-global-headers.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ <h1 class="title">Title</h1>
</ul>
{{- if $supra }}
<ul class="navbar-nav border-top border-1 border-dark d-flex flex-row d-lg-none">
<li class="nav-item"><a class="nav-link active" href="#" aria-label="English version" aria-current="true">EN</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="Version française" lang="fr" hreflang="fr">FR</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="Versión en español" lang="es" hreflang="es">ES</a></li>
<li class="nav-item"><a class="nav-link active" href="#" aria-label="EN English version" aria-current="true">EN</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="FR Version française" lang="fr" hreflang="fr">FR</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="ES Versión en español" lang="es" hreflang="es">ES</a></li>
</ul>
{{- end }}
</div>
Expand Down Expand Up @@ -160,9 +160,9 @@ <h1 class="title">Title</h1>
</ul>
{{- if $supra }}
<ul class="navbar-nav border-top border-1 border-dark d-flex flex-row d-lg-none">
<li class="nav-item"><a class="nav-link active" href="#" aria-label="English version" aria-current="true">EN</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="Version française" lang="fr" hreflang="fr">FR</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="Versión en español" lang="es" hreflang="es">ES</a></li>
<li class="nav-item"><a class="nav-link active" href="#" aria-label="EN English version" aria-current="true">EN</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="FR Version française" lang="fr" hreflang="fr">FR</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="ES Versión en español" lang="es" hreflang="es">ES</a></li>
</ul>
{{- end }}
</div>
Expand Down
6 changes: 3 additions & 3 deletions site/layouts/shortcodes/orange-supra.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</ul>
{{- if eq $mode "languages" }}
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link active" href="#" aria-label="English version" aria-current="true">EN</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="Version française" lang="fr" hreflang="fr">FR</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="Versión en español" lang="es" hreflang="es">ES</a></li>
<li class="nav-item"><a class="nav-link active" href="#" aria-label="EN English version" aria-current="true">EN</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="FR Version française" lang="fr" hreflang="fr">FR</a></li>
<li class="nav-item"><a class="nav-link" href="#" aria-label="ES Versión en español" lang="es" hreflang="es">ES</a></li>
</ul>
{{- end }}
{{- if eq $mode "actions" }}
Expand Down

0 comments on commit 945d22f

Please sign in to comment.