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

Change default pagination landmark to 'Pagination' #436

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions lib/govuk/components/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def reset!
# +:default_footer_meta_text+ nil
# +:default_footer_copyright_text+ '© Crown copyright'
# +:default_footer_copyright_url+ "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"
# +:default_pagination_landmark_label+ "results"
# +:default_pagination_landmark_label+ "Pagination"
# +:default_pagination_next_text+ Default 'next' text for pagination. An +Array+ where the first item is visible and the second visually hidden. Defaults to ["Next", "page"]
# +:default_pagination_previous_text+ Default 'previous' text for pagination. An +Array+ where the first item is visible and the second visually hidden. Defaults to ["Previous", "page"]
# +:default_phase_banner_tag+ nil
Expand Down Expand Up @@ -80,7 +80,7 @@ def reset!
default_footer_meta_text: nil,
default_footer_copyright_text: '© Crown copyright',
default_footer_copyright_url: "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",
default_pagination_landmark_label: "results",
default_pagination_landmark_label: "Pagination",
default_pagination_next_text: %w(Next page),
default_pagination_previous_text: %w(Previous page),
default_phase_banner_tag: nil,
Expand Down
4 changes: 2 additions & 2 deletions spec/components/govuk_component/pagination_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
expect(rendered_content).not_to have_tag("nav", with: { class: %w(govuk-pagination--block) })
end

specify "renders a default landmark label of 'results'" do
expect(rendered_content).to have_tag("nav", with: { "aria-label" => "results" })
specify "renders a default landmark label of 'Pagination'" do
expect(rendered_content).to have_tag("nav", with: { "aria-label" => "Pagination" })
end

specify "renders a previous link" do
Expand Down
Loading