Browse Source

accebility field

pull/648/head
JG 3 years ago
parent
commit
edba6d1f0c
  1. 2
      app/views/schemes/index.html.erb
  2. 5
      spec/requests/schemes_controller_spec.rb

2
app/views/schemes/index.html.erb

@ -5,6 +5,8 @@
<%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Supported housing services", sub: nil } : { main: "Supported housing services", sub: current_user.organisation.name } %>
<h2 class="govuk-visually-hidden">Supported housing services</h2>
<%= render SearchComponent.new(current_user:, search_label: "Search by service name or code", value: @searched) %>
<hr class="govuk-section-break govuk-section-break--visible govuk-section-break--m">

5
spec/requests/schemes_controller_spec.rb

@ -58,6 +58,11 @@ RSpec.describe SchemesController, type: :request do
expect(CGI.unescape_html(response.body)).to match("<strong>#{schemes.count}</strong> total schemes.")
end
it "has hidden accebility field with description" do
expected_field = "<h2 class=\"govuk-visually-hidden\">Supported housing services</h2>"
expect(CGI.unescape_html(response.body)).to include(expected_field)
end
context "when paginating over 20 results" do
let(:total_schemes_count) { Scheme.count }

Loading…
Cancel
Save