]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
docs(placeholder): drop role=img and use aria-hidden for decorative SVG placeholders...
authorGaël Poupard <ffoodd@users.noreply.github.com>
Fri, 4 Sep 2020 17:21:54 +0000 (19:21 +0200)
committerGitHub <noreply@github.com>
Fri, 4 Sep 2020 17:21:54 +0000 (20:21 +0300)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
site/layouts/shortcodes/placeholder.html

index 03fbd05df025168e83ac93781443b9cfd66d932a..2373bc927468ca819b6a05169955380855a2be8a 100644 (file)
@@ -23,7 +23,7 @@
 {{- $show_title := not (eq $title "false") -}}
 {{- $show_text := not (eq $text "false") -}}
 
-<svg class="bd-placeholder-img{{ with $class }} {{ . }}{{ end }}" width="{{ $width }}" height="{{ $height }}" xmlns="http://www.w3.org/2000/svg"{{ if (or $show_title $show_text) }} aria-label="{{ if $show_title }}{{ $title }}{{ if $show_text }}: {{ end }}{{ end }}{{ if ($show_text) }}{{ $text }}{{ end }}"{{ end }} preserveAspectRatio="xMidYMid slice" role="img" focusable="false">
+<svg class="bd-placeholder-img{{ with $class }} {{ . }}{{ end }}" width="{{ $width }}" height="{{ $height }}" xmlns="http://www.w3.org/2000/svg"{{ if (or $show_title $show_text) }} role="img" aria-label="{{ if $show_title }}{{ $title }}{{ if $show_text }}: {{ end }}{{ end }}{{ if ($show_text) }}{{ $text }}{{ end }}"{{ else }} aria-hidden="true"{{ end }} preserveAspectRatio="xMidYMid slice" focusable="false">
   {{- if $show_title -}}<title>{{ $title }}</title>{{- end -}}
   <rect width="100%" height="100%" fill="{{ $background }}"/>
   {{- if $show_text -}}<text x="50%" y="50%" fill="{{ $color }}" dy=".3em">{{ $text }}</text>{{- end -}}