Browse Source

Merge pull request #531 from communitiesuk/bug/cldc-1185-label-wrapped-in-header

CLDC-1185: now wrap label in div
pull/534/head
Kidd Hustle 3 years ago committed by GitHub
parent
commit
31b1ac0c8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/helpers/question_view_helper.rb
  2. 2
      spec/helpers/question_view_helper_spec.rb

2
app/helpers/question_view_helper.rb

@ -22,6 +22,6 @@ private
def label_tag(page_header, conditional)
return "" if conditional
page_header.blank? ? "h1" : "h2"
page_header.blank? ? "h1" : "div"
end
end

2
spec/helpers/question_view_helper_spec.rb

@ -46,7 +46,7 @@ RSpec.describe QuestionViewHelper do
let(:question) { OpenStruct.new(header: "Some question header") }
let(:size) { "m" }
let(:tag) { "h2" }
let(:tag) { "div" }
let(:legend_options_hash) do
{ text: "Some question header".html_safe, size:, tag: }
end

Loading…
Cancel
Save