Module: GovukVisuallyHiddenHelper

Defined in:
app/helpers/govuk_visually_hidden_helper.rb

Instance Method Summary collapse

Instance Method Details

#govuk_visually_hidden(text = nil, &block) ⇒ Object



2
3
4
5
6
# File 'app/helpers/govuk_visually_hidden_helper.rb', line 2

def govuk_visually_hidden(text = nil, &block)
  return if text.blank? && block.nil?

  tag.span(text, class: "#{brand}-visually-hidden", &block)
end