mirror of
https://github.com/we-promise/sure.git
synced 2026-05-24 13:04:56 +00:00
* fix(a11y): add skip-link and aria-current="page" to application layout * test(a11y): cover application layout skip-link and #main anchor * fix(a11y): extend skip-link and #main anchor to settings layout
28 lines
734 B
Ruby
28 lines
734 B
Ruby
require "test_helper"
|
|
|
|
class LayoutAccessibilityTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
sign_in users(:family_admin)
|
|
end
|
|
|
|
test "application layout renders skip-link pointing at #main and a <main> with id=\"main\"" do
|
|
get root_path
|
|
assert_response :ok
|
|
|
|
skip_text = I18n.t("layouts.application.skip_to_main")
|
|
|
|
assert_select "a[href=\"#main\"]", text: skip_text
|
|
assert_select "main#main"
|
|
end
|
|
|
|
test "settings layout renders skip-link pointing at #main and a <main> with id=\"main\"" do
|
|
get settings_profile_path
|
|
assert_response :ok
|
|
|
|
skip_text = I18n.t("layouts.application.skip_to_main")
|
|
|
|
assert_select "a[href=\"#main\"]", text: skip_text
|
|
assert_select "main#main"
|
|
end
|
|
end
|