Skip to content
Snippets Groups Projects
Unverified Commit cd992a14 authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Bloc video : correction a11y (#769)

parent 2facc910
No related branches found
No related tags found
No related merge requests found
{{- $block := .block -}}
{{- $block_class := partial "GetBlockClass" .block -}}
{{- $block_index := .index -}}
{{- $described_by_id := "" -}}
{{- with .block.data -}}
<div class="{{ $block_class }}">
......@@ -28,11 +29,13 @@
{{ end }}
{{ if .video_title }}
<p>{{- partial "PrepareHTML" .video_title -}}</p>
{{ $described_by_id = printf "block-video-title-%d" $block_index }}
<p aria-hidden="true">{{- partial "PrepareHTML" .video_title -}}</p>
{{ end }}
{{ partial "commons/transcription" ( dict
"block_index" $block_index
"described_by" $described_by_id
"transcription" .transcription
) }}
</div>
......
<div class="lazy-video-player">
<button class="lazy-video-player__play" title="{{- i18n "blocks.video.play" -}}" aria-label="{{- i18n "blocks.video.play" -}}"></button>
<button class="lazy-video-player__play">
<span class="sr-only">{{- i18n "blocks.video.play" }} - {{ .title -}}</span>
</button>
{{ if .poster }}
<img src="{{ .poster }}" alt="{{ .title }}" loading="lazy">
<img src="{{ .poster }}" alt="" loading="lazy">
{{ end }}
</div>
<div class="video-container">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment