module Organisations
  class WhatWeDoPresenter
    attr_reader :org

    def initialize(organisation)
      @org = organisation
    end

    def has_share_links?
      org.social_media_links.present?
    end

    def share_links
      links = []

      org.social_media_links.each do |link|
        links << {
          href: link["href"],
          text: link["title"],
          hidden_text: "Follow on",
          icon: link["service_type"],
        }
      end

      {
        stacked: true,
        brand: org.brand,
        links: links,
      }
    end
  end
end

module Organisations
  class WhatWeDoPresenter
    attr_reader :org

    def initialize(organisation)
      @org = organisation
    end

    def has_share_links?
      org.social_media_links.present?
    end

    def share_links
      links = []

      org.social_media_links.each do |link|
        links << {
          href: link["href"],
          text: link["title"],
          hidden_text: link["title"].include?('Sign up') ? "" : "Follow on",
          icon: link["service_type"],
        }
      end

      {
        stacked: true,
        brand: org.brand,
        links: links,
      }
    end
  end
end

Adjust organisation "Follow us" links hidden text
Adjust organisation "Follow us" links hidden text

Amends the hidden text for the organisation social media links. The
hidden text will now be empty when the link contains the words "Sign
up". An example of this is one organisation page has a "Sign up for
e-bulletin" link which a screen reader would read as "Follow on sign up
for e-bulletin" which obviously makes no sense.
