A11Y: improve markup of 404 page search form (#26322)

This commit is contained in:
Kris 2024-03-22 11:09:53 -04:00 committed by GitHub
parent 113b4246e6
commit 2f307b8f54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 7 deletions

View File

@ -53,3 +53,11 @@
flex-basis: 100%;
}
}
.page-not-found-search {
label {
color: var(--primary);
font-size: var(--font-up-3);
margin-bottom: 0.5em;
}
}

View File

@ -21,13 +21,11 @@
<%- unless @hide_search%>
<div class="row">
<div class="page-not-found-search">
<h2><%= t 'page_not_found.search_title' %></h2>
<p>
<form action='<%= path "/search" %>' id='discourse-search'>
<input type="text" name="q" value="<%= @slug %>">
<button class="btn btn-primary"><%= t 'page_not_found.search_button' %></button>
</form>
</p>
<form action='<%= path "/search" %>' id='discourse-search'>
<label for="search-input"><%= t 'page_not_found.search_title' %></label>
<input type="text" id="search-input" name="q" value="<%= @slug %>">
<button class="btn btn-primary"><%= t 'page_not_found.search_button' %></button>
</form>
</div>
</div>