Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address accessibility issues raised by Sitemorse report #1113

Merged
merged 16 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Wrap label in a h2 tag for accessibility
  • Loading branch information
pixeltrix committed Jan 8, 2025
commit 0d55099c9c12053055c969bd0087e871c303911f
8 changes: 6 additions & 2 deletions app/assets/stylesheets/petitions/views/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,19 @@ a.threshold-panel:hover, a.threshold-panel:focus {
padding-bottom: 0;
}

.search-petitions label {
.search-petitions h2 {
@include bold-36();

display: block;
margin-top: em(30, 20);
margin-bottom: em(10, 20);

@include media(tablet) {
margin-top: em(30, 24);
margin-bottom: em(10, 24);
}

label {
display: block;
margin: 0;
}
}
6 changes: 5 additions & 1 deletion app/views/pages/home/_search_petitions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
<input type="hidden" name="state" value="published">
<% end %>

<%= label_tag 'search', 'Search petitions', id: 'search-petitions-heading' %>
<h2 id="search-petitions-heading">
<%= label_tag 'search' do %>
Search petitions
<% end %>
</h2>

<div class="search-inline">
<%= search_field_tag 'q', nil, class: 'form-control', id: 'search' %>
Expand Down