accessibility: fix prohibited ARIA attributes for disabled previous page & next page elements (#1312)
accessibility: fix prohibited ARIA attributes for previous and next page button, if they are disabled Co-authored-by: Jimmy Cai <jimmy@cai.im>
This commit is contained in:
co-authored by
Jimmy Cai
parent
e55168d873
commit
96202fea2b
@@ -18,8 +18,10 @@
|
|||||||
{{- /* Previous page button */ -}}
|
{{- /* Previous page button */ -}}
|
||||||
<a
|
<a
|
||||||
class="page-link {{ if not $pag.Prev }}disabled{{ end }}"
|
class="page-link {{ if not $pag.Prev }}disabled{{ end }}"
|
||||||
{{- if $pag.Prev -}}href="{{ $pag.Prev.URL }}"{{- end -}}
|
{{- if $pag.Prev -}}
|
||||||
|
href="{{ $pag.Prev.URL }}"
|
||||||
aria-label="Previous page"
|
aria-label="Previous page"
|
||||||
|
{{- end -}}
|
||||||
{{- if not $pag.Prev -}}aria-disabled="true"{{- end -}}>
|
{{- if not $pag.Prev -}}aria-disabled="true"{{- end -}}>
|
||||||
{{ partial "helper/icon" "chevron-left" }}
|
{{ partial "helper/icon" "chevron-left" }}
|
||||||
</a>
|
</a>
|
||||||
@@ -101,8 +103,10 @@
|
|||||||
{{- /* Next page button */ -}}
|
{{- /* Next page button */ -}}
|
||||||
<a
|
<a
|
||||||
class="page-link {{ if not $pag.Next }}disabled{{ end }}"
|
class="page-link {{ if not $pag.Next }}disabled{{ end }}"
|
||||||
{{- if $pag.Next -}}href="{{ $pag.Next.URL }}"{{- end -}}
|
{{- if $pag.Next -}}
|
||||||
|
href="{{ $pag.Next.URL }}"
|
||||||
aria-label="Next page"
|
aria-label="Next page"
|
||||||
|
{{- end -}}
|
||||||
{{- if not $pag.Next -}}aria-disabled="true"{{- end -}}>
|
{{- if not $pag.Next -}}aria-disabled="true"{{- end -}}>
|
||||||
{{ partial "helper/icon" "chevron-right" }}
|
{{ partial "helper/icon" "chevron-right" }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user