add alert role to alert message element

This commit is contained in:
krvpb024 2024-02-05 14:20:05 +08:00 committed by Frédéric Guillot
parent 4f57309380
commit 39368ece9a
24 changed files with 33 additions and 33 deletions

View file

@ -134,10 +134,10 @@
</header> </header>
{{ end }} {{ end }}
{{ if .flashMessage }} {{ if .flashMessage }}
<div class="flash-message alert alert-success">{{ .flashMessage }}</div> <div role="alert" class="flash-message alert alert-success">{{ .flashMessage }}</div>
{{ end }} {{ end }}
{{ if .flashErrorMessage }} {{ if .flashErrorMessage }}
<div class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div> <div role="alert" class="flash-error-message alert alert-error">{{ .flashErrorMessage }}</div>
{{ end }} {{ end }}
{{template "page_header" .}} {{template "page_header" .}}

View file

@ -9,13 +9,13 @@
{{ define "content"}} {{ define "content"}}
{{ if not .categories }} {{ if not .categories }}
<p class="alert alert-error">{{ t "page.add_feed.no_category" }}</p> <p role="alert" class="alert alert-error">{{ t "page.add_feed.no_category" }}</p>
{{ else }} {{ else }}
<form action="{{ route "submitSubscription" }}" method="post" autocomplete="off"> <form action="{{ route "submitSubscription" }}" method="post" autocomplete="off">
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<label for="form-url">{{ t "page.add_feed.label.url" }}</label> <label for="form-url">{{ t "page.add_feed.label.url" }}</label>

View file

@ -12,7 +12,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .entries }} {{ if not .entries }}
<p class="alert alert-info">{{ t "alert.no_bookmark" }}</p> <p role="alert" class="alert alert-info">{{ t "alert.no_bookmark" }}</p>
{{ else }} {{ else }}
<div class="pagination-top"> <div class="pagination-top">
{{ template "pagination" .pagination }} {{ template "pagination" .pagination }}

View file

@ -19,7 +19,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .categories }} {{ if not .categories }}
<p class="alert alert-error">{{ t "alert.no_category" }}</p> <p role="alert" class="alert alert-error">{{ t "alert.no_category" }}</p>
{{ else }} {{ else }}
<div class="items"> <div class="items">
{{ range .categories }} {{ range .categories }}

View file

@ -59,7 +59,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .entries }} {{ if not .entries }}
<p class="alert">{{ t "alert.no_category_entry" }}</p> <p role="alert" class="alert">{{ t "alert.no_category_entry" }}</p>
{{ else }} {{ else }}
<div class="pagination-top"> <div class="pagination-top">
{{ template "pagination" .pagination }} {{ template "pagination" .pagination }}

View file

@ -38,7 +38,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .feeds }} {{ if not .feeds }}
<p class="alert">{{ t "alert.no_feed_in_category" }}</p> <p role="alert" class="alert">{{ t "alert.no_feed_in_category" }}</p>
{{ else }} {{ else }}
{{ template "feed_list" dict "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }} {{ template "feed_list" dict "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }}
{{ end }} {{ end }}

View file

@ -12,7 +12,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<label for="form-description">{{ t "form.api_key.label.description" }}</label> <label for="form-description">{{ t "form.api_key.label.description" }}</label>

View file

@ -18,7 +18,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<label for="form-title">{{ t "form.category.label.title" }}</label> <label for="form-title">{{ t "form.category.label.title" }}</label>

View file

@ -12,7 +12,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<label for="form-username">{{ t "form.user.label.username" }}</label> <label for="form-username">{{ t "form.user.label.username" }}</label>

View file

@ -24,7 +24,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<label for="form-title">{{ t "form.category.label.title" }}</label> <label for="form-title">{{ t "form.category.label.title" }}</label>

View file

@ -28,10 +28,10 @@
{{ define "content"}} {{ define "content"}}
{{ if not .categories }} {{ if not .categories }}
<p class="alert alert-error">{{ t "page.add_feed.no_category" }}</p> <p role="alert" class="alert alert-error">{{ t "page.add_feed.no_category" }}</p>
{{ else }} {{ else }}
{{ if ne .feed.ParsingErrorCount 0 }} {{ if ne .feed.ParsingErrorCount 0 }}
<div class="alert alert-error"> <div role="alert" class="alert alert-error">
<h3>{{ t "page.edit_feed.last_parsing_error" }}</h3> <h3>{{ t "page.edit_feed.last_parsing_error" }}</h3>
<p>{{ t .feed.ParsingErrorMsg }}</p> <p>{{ t .feed.ParsingErrorMsg }}</p>
</div> </div>
@ -41,7 +41,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<fieldset> <fieldset>
@ -200,7 +200,7 @@
</ul> </ul>
</div> </div>
<div class="alert alert-error"> <div role="alert" class="alert alert-error">
<a href="#" <a href="#"
data-confirm="true" data-confirm="true"
data-action="remove-feed" data-action="remove-feed"

View file

@ -12,7 +12,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<label for="form-username">{{ t "form.user.label.username" }}</label> <label for="form-username">{{ t "form.user.label.username" }}</label>

View file

@ -75,7 +75,7 @@
{{ define "content"}} {{ define "content"}}
{{ if ne .feed.ParsingErrorCount 0 }} {{ if ne .feed.ParsingErrorCount 0 }}
<div class="alert alert-error"> <div role="alert" class="alert alert-error">
<h3>{{ t "alert.feed_error" }}</h3> <h3>{{ t "alert.feed_error" }}</h3>
<p>{{ t .feed.ParsingErrorMsg }}</p> <p>{{ t .feed.ParsingErrorMsg }}</p>
</div> </div>
@ -83,9 +83,9 @@
{{ if not .entries }} {{ if not .entries }}
{{ if .showOnlyUnreadEntries }} {{ if .showOnlyUnreadEntries }}
<p class="alert">{{ t "alert.no_unread_entry" }}</p> <p role="alert" class="alert">{{ t "alert.no_unread_entry" }}</p>
{{ else }} {{ else }}
<p class="alert">{{ t "alert.no_feed_entry" }}</p> <p role="alert" class="alert">{{ t "alert.no_feed_entry" }}</p>
{{ end }} {{ end }}
{{ else }} {{ else }}
<div class="pagination-top"> <div class="pagination-top">

View file

@ -9,7 +9,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .feeds }} {{ if not .feeds }}
<p class="alert">{{ t "alert.no_feed" }}</p> <p role="alert" class="alert">{{ t "alert.no_feed" }}</p>
{{ else }} {{ else }}
{{ template "feed_list" dict "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }} {{ template "feed_list" dict "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }}
{{ end }} {{ end }}

View file

@ -31,7 +31,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .entries }} {{ if not .entries }}
<p class="alert alert-info">{{ t "alert.no_history" }}</p> <p role="alert" class="alert alert-info">{{ t "alert.no_history" }}</p>
{{ else }} {{ else }}
<div class="pagination-top"> <div class="pagination-top">
{{ template "pagination" .pagination }} {{ template "pagination" .pagination }}

View file

@ -9,7 +9,7 @@
{{ define "content"}} {{ define "content"}}
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<form action="{{ route "uploadOPML" }}" method="post" enctype="multipart/form-data"> <form action="{{ route "uploadOPML" }}" method="post" enctype="multipart/form-data">

View file

@ -12,7 +12,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<details {{ if .form.AppriseEnabled }}open{{ end }}> <details {{ if .form.AppriseEnabled }}open{{ end }}>

View file

@ -9,7 +9,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<label for="form-username">{{ t "form.user.label.username" }}</label> <label for="form-username">{{ t "form.user.label.username" }}</label>
@ -24,7 +24,7 @@
</form> </form>
{{ if .webAuthnEnabled }} {{ if .webAuthnEnabled }}
<div class="webauthn"> <div class="webauthn">
<div class="alert alert-error hidden" id="webauthn-error"> <div role="alert" class="alert alert-error hidden" id="webauthn-error">
{{ t "page.login.webauthn_login.error" }} {{ t "page.login.webauthn_login.error" }}
</div> </div>
<div class="buttons"> <div class="buttons">

View file

@ -8,7 +8,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .entries }} {{ if not .entries }}
<p class="alert alert-info">{{ t "alert.no_search_result" }}</p> <p role="alert" class="alert alert-info">{{ t "alert.no_search_result" }}</p>
{{ else }} {{ else }}
<div class="pagination-top"> <div class="pagination-top">
{{ template "pagination" .pagination }} {{ template "pagination" .pagination }}

View file

@ -12,7 +12,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<fieldset> <fieldset>
@ -54,7 +54,7 @@
<fieldset> <fieldset>
<legend>{{ t "page.settings.webauthn.passkeys" }}</legend> <legend>{{ t "page.settings.webauthn.passkeys" }}</legend>
<div class="alert alert-error hidden" id="webauthn-error"> <div role="alert" class="alert alert-error hidden" id="webauthn-error">
{{ t "page.settings.webauthn.register.error" }} {{ t "page.settings.webauthn.register.error" }}
</div> </div>

View file

@ -31,7 +31,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .entries }} {{ if not .entries }}
<p class="alert alert-info">{{ t "alert.no_shared_entry" }}</p> <p role="alert" class="alert alert-info">{{ t "alert.no_shared_entry" }}</p>
{{ else }} {{ else }}
<div class="items"> <div class="items">
{{ range .entries }} {{ range .entries }}

View file

@ -39,7 +39,7 @@
{{ define "content"}} {{ define "content"}}
{{ if not .entries }} {{ if not .entries }}
<p class="alert">{{ t "alert.no_unread_entry" }}</p> <p role="alert" class="alert">{{ t "alert.no_unread_entry" }}</p>
{{ else }} {{ else }}
<div class="pagination-top"> <div class="pagination-top">
{{ template "pagination" .pagination }} {{ template "pagination" .pagination }}

View file

@ -9,7 +9,7 @@
{{ define "content"}} {{ define "content"}}
{{ if eq (len .users) 1 }} {{ if eq (len .users) 1 }}
<p class="alert">{{ t "alert.no_user" }}</p> <p role="alert" class="alert">{{ t "alert.no_user" }}</p>
{{ else }} {{ else }}
<table> <table>
<tr> <tr>

View file

@ -11,7 +11,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}"> <input type="hidden" name="csrf" value="{{ .csrf }}">
{{ if .errorMessage }} {{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div> <div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }} {{ end }}
<label for="form-title">{{ t "page.settings.webauthn.passkey_name" }}</label> <label for="form-title">{{ t "page.settings.webauthn.passkey_name" }}</label>