Skip to content

Commit

Permalink
Retrait du role="figure" des figures sans contenu textuel (crédit, …
Browse files Browse the repository at this point in the history
…alt ou texte) (#727)

Co-authored-by: Alexis BENOIT <alex@noesya.coop>
  • Loading branch information
Olivia206 and alexisben authored Nov 14, 2024
1 parent fa15d46 commit 90cdbb4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/blocks/templates/call_to_action.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{{- end -}}
</div>
{{ if .image }}
<figure role="figure" {{- with or .alt .credit }} aria-label="{{ . | plainify }}" {{ end }}>
<figure {{- with or .alt .credit }} role="figure" aria-label="{{ . | plainify }}" {{ end }}>
{{ partial "commons/image.html"
(dict
"image" .image.file
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/blocks/templates/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div>{{ partial "PrepareHTML" .description }}</div>
</div>
{{- if .image -}}
<figure role="figure" {{- with or .alt .credit }} aria-label="{{ . | plainify }}" {{ end }}>
<figure {{- with or .alt .credit }} role="figure" aria-label="{{ . | plainify }}" {{ end }}>
{{- partial "commons/image.html"
(dict
"image" .image
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/blocks/templates/testimonials/single.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<figure class="testimonial {{ if .params.photo }}with-picture{{ end }}">
<figure class="testimonial {{ if .params.photo }}with-picture{{ end }}" {{ with .params.author -}} role="figure" aria-label="{{ . }}" {{- end }}>
{{ with .params }}
{{ $is_long := gt (len .text) 150 }}
<blockquote {{- if $is_long }} class="is-long" {{- end }}>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/organizations/logo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{ if site.Params.organizations.dark_logo_background }}
{{ $logo_index = "logo_on_dark_background" }}
{{ end }}
<figure class="organization-logo">
<figure class="organization-logo" {{ with .Title -}} role="figure" aria-label="{{ . }}" {{- end }}>
{{- partial "commons/image.html"
(dict
"image" (index .Params $logo_index)
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/programs/image.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{ if . }}
<figure role="figure" class="featured-image">
<figure {{ with .credit }} role="figure" aria-label="{{ . | plainify }}"{{ end }} class="featured-image">
{{ partial "commons/image.html"
(dict
"image" .
"sizes" site.Params.image_sizes.sections.programs.image
"itemprop" true
"crop" true
)}}
{{ if partial "GetTextFromHTML" .credit }}
<figcaption class="credit">{{ partial "PrepareHTML" .credit }}</figcaption>
{{ with partial "GetTextFromHTML" .credit }}
<figcaption class="credit">{{ . }}</figcaption>
{{ end }}
</figure>
{{ end }}

0 comments on commit 90cdbb4

Please sign in to comment.