Add alt attribute to map images
We were using it on the map displayed on the sidebar, but we weren't using it in the other places were the map is rendered.
This commit is contained in:
@@ -23,6 +23,6 @@
|
||||
</div>
|
||||
|
||||
<div class="medium-5 column show-for-medium text-center">
|
||||
<%= image_tag(image_path_for("map.jpg")) %>
|
||||
<%= image_tag(image_path_for("map.jpg"), alt: t("shared.tags_cloud.districts_list")) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
|
||||
<div class="show-for-medium medium-9 column text-center">
|
||||
<%= image_tag(image_path_for("map.jpg"), usemap: "#map") %>
|
||||
<%= image_tag(image_path_for("map.jpg"), alt: t("shared.tags_cloud.districts_list"), usemap: "#map") %>
|
||||
</div>
|
||||
|
||||
<map name="map" id="html_map">
|
||||
|
||||
@@ -45,19 +45,19 @@ describe "Admin custom images", :admin do
|
||||
visit proposals_path
|
||||
|
||||
within("#map") do
|
||||
expect(page).to have_css("img[src*='custom_map.jpg']")
|
||||
expect(page).to have_css("img[src*='custom_map.jpg'][alt='Districts list']")
|
||||
end
|
||||
|
||||
visit map_proposals_path
|
||||
|
||||
within(".show-for-medium") do
|
||||
expect(page).to have_css("img[src*='custom_map.jpg']")
|
||||
expect(page).to have_css("img[src*='custom_map.jpg'][alt='Districts list']")
|
||||
end
|
||||
|
||||
visit budget_group_path(budget, group)
|
||||
|
||||
within(".show-for-medium") do
|
||||
expect(page).to have_css("img[src*='custom_map.jpg']")
|
||||
expect(page).to have_css("img[src*='custom_map.jpg'][alt='Districts list']")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user