Method: CCS::Components::GovUK::TaskList::Item::Title#initialize
- Defined in:
- lib/ccs/components/govuk/task_list/item/title.rb
#initialize(text:, id_prefix:, href: nil, hint_text: nil) ⇒ Title
Returns a new instance of Title.
30 31 32 33 34 35 36 |
# File 'lib/ccs/components/govuk/task_list/item/title.rb', line 30 def initialize(text:, id_prefix:, href: nil, hint_text: nil, **) super(**) @options[:attributes][:aria] = { describedby: (hint_text ? "#{id_prefix}-hint " : '') + "#{id_prefix}-status" } if href @text = text @href = href end |