Skip to content

Commit

Permalink
Update fixes class and tags for accessibility and semantic
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastou committed Feb 3, 2022
1 parent a7ebf8f commit c5b88d0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions assets/css/1_main.css
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ footer > * {
margin-top: -0.4em;
}

.hero h1 {
.hero h1:not(.h2) {
font-size: var(--s5);
padding-top: calc(2 * var(--s5));
padding-right: 30%;
}

@media (max-width: 60rem) {
.hero h1 {
.hero h1:not(.h2) {
font-size: var(--s3);
padding-top: calc(2 * var(--s4));
padding-right: 0;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/components/Collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Collapse {
* @param {boolean} value
*/
setCollapseVisibility(value) {
this.content.classList[value ? "remove" : "add"]("vh");
this.content.classList[value ? "remove" : "add"]("display:none");
this.button.setAttribute("aria-expanded", value ? "true" : "false");
}
}
Expand Down
7 changes: 4 additions & 3 deletions content/fr/result/_#first_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ id="intro"
widget="result-intro"
+++

Calculé le {{< result-date >}}
Calculé le {{< result-date >}}


## Résultat pour {{< result-url >}}
<h1 class="h2 font-weight:semi-bold">
Résultat pour {{< result-url >}}
</h1>
8 changes: 4 additions & 4 deletions content/fr/result/_30_empreinte.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ collapse_info = """
<p>
L'empreinte environnementale de la page est exprimée par 2 indicateurs environnementaux.
</p>
<h4>
<h3 class="h4">
<span class="svg-inline">
<svg aria-hidden="true">
<use xlink:href="#icon-cloud"></use>
</svg>
</span>
Gaz à effet de serre (GES)
</h4>
</h3>
<p>
L'empreinte GES de la page est exprimée en gramme équivalent CO2 (g eCO2).
</p>
<h4>
<h3 class="h4">
<span class="svg-inline">
<svg class="svg-inline" aria-hidden="true">
<use xlink:href="#icon-water-drop"></use>
</svg>
</span>
Eau
</h4>
</h3>
<p>
L'empreinte en eau témoigne de la consommation d'eau nécessaire à l'affichage de cette page. La phase d'extraction des métaux nécessaires à la fabrication des équipements requiert une grande quantité d'eau.
</p>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/components/collapse.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<button class="collapse-button js-collapse-button button-default font-weight:bold text-align:start" aria-label="{{ .label }}" aria-expanded="false" aria-describedby="collapse-{{ $randomId }}">
<span class="text-decoration:underline">{{ .label }}</span>&nbsp;<span>{{ partial "svg/inline-svg-use" "icon-anchor-down" }}</span>
</button>
<div class="collapse-content js-collapse-content vh" id="collapse-{{ $randomId }}" role="collapse">
<div class="collapse-content js-collapse-content display:none" id="collapse-{{ $randomId }}" role="collapse">
<div>{{ .content | printf "%s\n\n<p></p>" | markdownify | replaceRE "\n*<p></p>\n*$" "" | safeHTML }}</div>
{{if and (isset . "moreHref") (isset . "moreLabel") }}
<hr class="x-small">
Expand Down

0 comments on commit c5b88d0

Please sign in to comment.