Skip to content

Commit

Permalink
add alert role to alert message element
Browse files Browse the repository at this point in the history
  • Loading branch information
krvpb024 committed Feb 5, 2024
1 parent 7d9f174 commit b605100
Show file tree
Hide file tree
Showing 24 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions internal/template/templates/common/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@
</header>
{{ end }}
{{ if .flashMessage }}
<div class="flash-message alert alert-success">{{ .flashMessage }}</div>
<div role="alert" class="flash-message alert alert-success">{{ .flashMessage }}</div>
{{ end }}
{{ 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 }}

{{template "page_header" .}}
Expand Down
4 changes: 2 additions & 2 deletions internal/template/templates/views/add_subscription.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ <h1 id="page-header-title">{{ t "page.add_feed.title" }}</h1>

{{ define "content"}}
{{ 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 }}
<form action="{{ route "submitSubscription" }}" method="post" autocomplete="off">
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<label for="form-url">{{ t "page.add_feed.label.url" }}</label>
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/bookmark_entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1 id="page-header-title" dir="auto">

{{ define "content"}}
{{ 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 }}
<div class="pagination-top">
{{ template "pagination" .pagination }}
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1 id="page-header-title" dir="auto">

{{ define "content"}}
{{ 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 }}
<div class="items">
{{ range .categories }}
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/category_entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1 id="page-header-title" dir="auto">

{{ define "content"}}
{{ if not .entries }}
<p class="alert">{{ t "alert.no_category_entry" }}</p>
<p role="alert" class="alert">{{ t "alert.no_category_entry" }}</p>
{{ else }}
<div class="pagination-top">
{{ template "pagination" .pagination }}
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/category_feeds.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 id="page-header-title" dir="auto">

{{ define "content"}}
{{ 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 }}
{{ template "feed_list" dict "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/create_api_key.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1 id="page-header-title">{{ t "page.new_api_key.title" }}</h1>
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<label for="form-description">{{ t "form.api_key.label.description" }}</label>
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/create_category.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1 id="page-header-title">{{ t "page.new_category.title" }}</h1>
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<label for="form-title">{{ t "form.category.label.title" }}</label>
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/create_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1 id="page-header-title">{{ t "page.new_user.title" }}</h1>
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<label for="form-username">{{ t "form.user.label.username" }}</label>
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/edit_category.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1 id="page-header-title">{{ t "page.edit_category.title" .category.Title }}</h
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<label for="form-title">{{ t "form.category.label.title" }}</label>
Expand Down
8 changes: 4 additions & 4 deletions internal/template/templates/views/edit_feed.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ <h1 id="page-header-title" dir="auto">{{ .feed.Title }}</h1>

{{ define "content"}}
{{ 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 }}
{{ 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>
<p>{{ t .feed.ParsingErrorMsg }}</p>
</div>
Expand All @@ -41,7 +41,7 @@ <h3>{{ t "page.edit_feed.last_parsing_error" }}</h3>
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<fieldset>
Expand Down Expand Up @@ -200,7 +200,7 @@ <h3>{{ t "page.edit_feed.last_parsing_error" }}</h3>
</ul>
</div>

<div class="alert alert-error">
<div role="alert" class="alert alert-error">
<a href="#"
data-confirm="true"
data-action="remove-feed"
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/edit_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1 id="page-header-title">{{ t "page.edit_user.title" .selected_user.Username }
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<label for="form-username">{{ t "form.user.label.username" }}</label>
Expand Down
6 changes: 3 additions & 3 deletions internal/template/templates/views/feed_entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ <h1 id="page-header-title" dir="auto">

{{ define "content"}}
{{ if ne .feed.ParsingErrorCount 0 }}
<div class="alert alert-error">
<div role="alert" class="alert alert-error">
<h3>{{ t "alert.feed_error" }}</h3>
<p>{{ t .feed.ParsingErrorMsg }}</p>
</div>
{{ end }}

{{ if not .entries }}
{{ if .showOnlyUnreadEntries }}
<p class="alert">{{ t "alert.no_unread_entry" }}</p>
<p role="alert" class="alert">{{ t "alert.no_unread_entry" }}</p>
{{ else }}
<p class="alert">{{ t "alert.no_feed_entry" }}</p>
<p role="alert" class="alert">{{ t "alert.no_feed_entry" }}</p>
{{ end }}
{{ else }}
<div class="pagination-top">
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/feeds.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1 id="page-header-title">{{ t "page.feeds.title" }} ({{ .total }})</h1>

{{ define "content"}}
{{ if not .feeds }}
<p class="alert">{{ t "alert.no_feed" }}</p>
<p role="alert" class="alert">{{ t "alert.no_feed" }}</p>
{{ else }}
{{ template "feed_list" dict "user" .user "feeds" .feeds "ParsingErrorCount" .ParsingErrorCount }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/history_entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1 id="page-header-title">

{{ define "content"}}
{{ 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 }}
<div class="pagination-top">
{{ template "pagination" .pagination }}
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/import.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1 id="page-header-title">{{ t "page.import.title" }}</h1>

{{ define "content"}}
{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<form action="{{ route "uploadOPML" }}" method="post" enctype="multipart/form-data">
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/integrations.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1 id="page-header-title">{{ t "page.integrations.title" }}</h1>
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<details {{ if .form.AppriseEnabled }}open{{ end }}>
Expand Down
4 changes: 2 additions & 2 deletions internal/template/templates/views/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<label for="form-username">{{ t "form.user.label.username" }}</label>
Expand All @@ -24,7 +24,7 @@
</form>
{{ if .webAuthnEnabled }}
<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" }}
</div>
<div class="buttons">
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/search_entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1 id="page-header-title">{{ t "page.search.title" }} ({{ .total }})</h1>

{{ define "content"}}
{{ 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 }}
<div class="pagination-top">
{{ template "pagination" .pagination }}
Expand Down
4 changes: 2 additions & 2 deletions internal/template/templates/views/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1 id="page-header-title">{{ t "page.settings.title" }}</h1>
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<fieldset>
Expand Down Expand Up @@ -54,7 +54,7 @@ <h1 id="page-header-title">{{ t "page.settings.title" }}</h1>
<fieldset>
<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" }}
</div>

Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/shared_entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1 id="page-header-title">

{{ define "content"}}
{{ 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 }}
<div class="items">
{{ range .entries }}
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/unread_entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1 id="page-header-title">

{{ define "content"}}
{{ if not .entries }}
<p class="alert">{{ t "alert.no_unread_entry" }}</p>
<p role="alert" class="alert">{{ t "alert.no_unread_entry" }}</p>
{{ else }}
<div class="pagination-top">
{{ template "pagination" .pagination }}
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1 id="page-header-title">{{ t "page.users.title" }}</h1>

{{ define "content"}}
{{ if eq (len .users) 1 }}
<p class="alert">{{ t "alert.no_user" }}</p>
<p role="alert" class="alert">{{ t "alert.no_user" }}</p>
{{ else }}
<table>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion internal/template/templates/views/webauthn_rename.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1 id="page-header-title">{{ t "page.webauthn_rename.title" }}</h1>
<input type="hidden" name="csrf" value="{{ .csrf }}">

{{ if .errorMessage }}
<div class="alert alert-error">{{ .errorMessage }}</div>
<div role="alert" class="alert alert-error">{{ .errorMessage }}</div>
{{ end }}

<label for="form-title">{{ t "page.settings.webauthn.passkey_name" }}</label>
Expand Down

0 comments on commit b605100

Please sign in to comment.