Skip to content

Commit

Permalink
Remove hidden "Share on" from share links text
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danacotoran committed Nov 17, 2020
1 parent 0f3eecb commit c129f15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/presenters/content_item/shareable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ def share_links
[
{
href: facebook_share_url,
text: '<span class="visually-hidden">Share on </span>Facebook'.html_safe,
text: "Facebook",
icon: "facebook",
},
{
href: twitter_share_url,
text: '<span class="visually-hidden">Share on </span>Twitter'.html_safe,
text: "Twitter",
icon: "twitter",
},
]
Expand Down
4 changes: 2 additions & 2 deletions test/integration/consultation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c129f15

Please sign in to comment.