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

AP-4774: Fix accessibility issues with hidden labels #6292

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 10 additions & 12 deletions app/views/providers/cookies/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,29 @@
<p class="govuk-body"><%= t(".cookies_are_files") %></p>
<p class="govuk-body"><%= t(".we_use_cookies") %></p>

<h2 class="govuk-heading-m"><%= t(".heading_2") %></h2>
<p class="govuk-body"><%= t(".we_use_ga") %></p>
<p class="govuk-body"><%= t(".we_do_not_allow") %></p>
<p class="govuk-body"><%= t(".google_analytics") %></p>
<%= form.govuk_radio_buttons_fieldset :cookies_enabled,
legend: { size: "m", tag: "h2", text: t(".heading_2") } do %>

<%= list_from_translation_path(".cookies.show") %>
<p class="govuk-body"><%= t(".we_use_ga") %></p>
<p class="govuk-body"><%= t(".we_do_not_allow") %></p>
<p class="govuk-body"><%= t(".google_analytics") %></p>

<div class="govuk-!-padding-2"></div>
<ul class="govuk-list govuk-list--bullet">
<% t(".list").each do |item| %>
<li><%= item %></li>
<% end %>
</ul>

<%= form.govuk_radio_buttons_fieldset :cookies_enabled,
legend: { size: "m", tag: "h2", text: t(".heading_2"), hidden: true } do %>
<%= form.govuk_radio_button :cookies_enabled, true, link_errors: true, label: { text: t(".use_this_cookie") } %>
<%= form.govuk_radio_button :cookies_enabled, false, label: { text: t(".do_not_use") } %>
<% end %>

<div class="govuk-!-padding-2"></div>

<h2 class="govuk-heading-m"><%= t(".heading_3") %></h2>
<p class="govuk-body"><%= t(".these_essential_cookies") %></p>
<p class="govuk-body"><%= t(".they_always_need") %></p>

<p class='govuk-body'><%= govuk_link_to(t(".find_out_more_link"), "https://www.gov.uk/help/cookie-details") %></p>

<div class="govuk-!-padding-2"></div>

<%= form.govuk_submit(t(".save_changes_btn")) %>
<% end %>
<% end %>
17 changes: 7 additions & 10 deletions app/views/providers/legal_aid_applications/search.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@

<%= render partial: "shared/error" if @error %>

<%= form.govuk_fieldset legend: { text: page_title, tag: "h1", size: "xl" } do %>
<div class="govuk-!-padding-bottom-4"></div>
<%= form.govuk_text_field(
:search_term,
label: { text: :search_term, hidden: true },
caption: { text: t(".hint") },
width: "two-thirds",
value: @search_term,
) %>
<% end %>
<%= form.govuk_text_field(
:search_term,
label: { text: "Search applications", size: "xl", tag: "h1" },
hint: { text: t(".hint") },
width: "two-thirds",
value: @search_term,
) %>

<%= form.govuk_submit t(".search_button") %>
<% end %>
Expand Down
10 changes: 5 additions & 5 deletions config/locales/en/providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ en:
heading_2: Cookies that measure website use
we_use_ga: We use Google Analytics to measure how you use the service so we can improve it based on user needs.
we_do_not_allow: We do not allow Google to use or share the data about how you use this site.
google_analytics: Google Analytics sets cookies that store anonymised information about
list: |
how you got to the site
the pages you visit on Apply for legal aid, and how long you spend on each page
what you click on while you're visiting the site
google_analytics: "Google Analytics sets cookies that store anonymised information about:"
list:
- how you got to the site
- the pages you visit on Apply for legal aid, and how long you spend on each page
- what you click on while you're visiting the site
use_this_cookie: Use this cookie to measure my website use
do_not_use: Do not use this cookie to measure my website use
heading_3: Strictly necessary cookies
Expand Down