From c129f15271358c092b26ffb7999810ed74557721 Mon Sep 17 00:00:00 2001 From: Dana Cotoran Date: Tue, 17 Nov 2020 17:48:07 +0000 Subject: [PATCH] Remove hidden "Share on" from share links text The share links now have "Share on" as visually hidden text by default. This helps AT users make sense of the links (ie "Share on Facebook" makes more sense than just "Facebook"). Therefore it is not necessary to add this visually hidden text on the rendering app side. --- app/presenters/content_item/shareable.rb | 4 ++-- test/integration/consultation_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/presenters/content_item/shareable.rb b/app/presenters/content_item/shareable.rb index 627e41a25..30e98f427 100644 --- a/app/presenters/content_item/shareable.rb +++ b/app/presenters/content_item/shareable.rb @@ -6,12 +6,12 @@ def share_links [ { href: facebook_share_url, - text: 'Share on Facebook'.html_safe, + text: "Facebook", icon: "facebook", }, { href: twitter_share_url, - text: 'Share on Twitter'.html_safe, + text: "Twitter", icon: "twitter", }, ] diff --git a/test/integration/consultation_test.rb b/test/integration/consultation_test.rb index f60dbf4b7..dba73a893 100644 --- a/test/integration/consultation_test.rb +++ b/test/integration/consultation_test.rb @@ -154,7 +154,7 @@ class ConsultationTest < ActionDispatch::IntegrationTest test "share urls" do setup_and_visit_content_item("open_consultation") - assert page.has_css?("a", text: "Share on Facebook") - assert page.has_css?("a", text: "Share on Twitter") + assert page.has_css?("a", text: "Facebook") + assert page.has_css?("a", text: "Twitter") end end