Added the role="article" to <article> elements for better accessibility with screen readers and chromium based browsers

This commit is contained in:
Akash Kakkar 2021-10-23 02:20:17 +05:30 committed by GitHub
parent 2dcabc840c
commit 03fd403e38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 9 deletions

View file

@ -1,7 +1,7 @@
{{ define "feed_list" }}
<div class="items">
{{ range .feeds }}
<article class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ else if ne .UnreadCount 0 }}feed-has-unread{{ end }}">
<article role="article" class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ else if ne .UnreadCount 0 }}feed-has-unread{{ end }}">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if and (.Icon) (gt .Icon.IconID 0) }}

View file

@ -10,7 +10,7 @@
{{ else }}
<div class="items">
{{ range .entries }}
<article class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}

View file

@ -15,7 +15,7 @@
{{ else }}
<div class="items">
{{ range .categories }}
<article class="item">
<article role="article" class="item">
<div class="item-header" dir="auto">
<span class="item-title">
<a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>

View file

@ -44,7 +44,7 @@
{{ else }}
<div class="items">
{{ range .entries }}
<article class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}

View file

@ -131,7 +131,7 @@
</div>
{{ end }}
{{ end }}
<article class="entry-content" dir="auto">
<article role="article" class="entry-content" dir="auto">
{{ if .user }}
{{ noescape (proxyFilter .entry.Content) }}
{{ else }}

View file

@ -72,7 +72,7 @@
{{ else }}
<div class="items">
{{ range .entries }}
<article class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}

View file

@ -10,7 +10,7 @@
{{ else }}
<div class="items">
{{ range .entries }}
<article class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}

View file

@ -26,7 +26,7 @@
{{ else }}
<div class="items">
{{ range .entries }}
<article class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}

View file

@ -33,7 +33,7 @@
{{ else }}
<div class="items hide-read-items">
{{ range .entries }}
<article class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<article role="article" class="item {{ if $.user.EntrySwipe }}touch-item{{ end }} item-status-{{ .Status }}" data-id="{{ .ID }}">
<div class="item-header" dir="auto">
<span class="item-title">
{{ if ne .Feed.Icon.IconID 0 }}