Merge pull request #6144 from consuldemocracy/serious_accessibility_issues

Fix most Axe serious accessibility issues
This commit is contained in:
Javi Martín
2025-11-14 15:49:51 +01:00
committed by GitHub
8 changed files with 38 additions and 15 deletions

View File

@@ -36,7 +36,8 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
find("#new_map_location").click
within ".map-location" do
expect(page).to have_css(".map-icon")
expect(page).to have_css ".map-icon"
expect(page).not_to have_css ".map-icon[aria-label]"
end
end
@@ -274,14 +275,15 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
set_arguments(arguments, mappable, mappable_path_arguments)
end
scenario "Should display map and marker on #{mappable_factory_name} show page" do
scenario "Should display marker on #{mappable_factory_name} show page with aria label" do
arguments[:id] = mappable.id
mappable.update!(title: "Malformed quote\" and >")
do_login_for user, management: management if management
visit send(mappable_show_path, arguments)
within ".map-location" do
expect(page).to have_css(".map-icon")
expect(page).to have_css ".map-icon[aria-label='#{mappable.title}']"
end
end

View File

@@ -193,6 +193,8 @@ describe "Ballots" do
expect(page).to have_content "OpenStreetMap"
expect(page).to have_content "New Block"
expect(page).to have_css ".map-icon", visible: :all, count: 2
expect(page).to have_css ".map-icon[aria-label='More bridges']", visible: :all
expect(page).to have_css ".map-icon[aria-label='Less bridges']", visible: :all
end
add_to_ballot("More bridges")