From b7ee9351445586af7080901ec130757bd7f7e13e Mon Sep 17 00:00:00 2001 From: taitus Date: Wed, 22 Feb 2023 08:53:21 +0100 Subject: [PATCH] Fix broken h3 tag Since we're now allowing

and

tags in the description, we remove the broken

tag from quiz-question class. Since its content is also in the element, and in order to be consistent with other show actions in the public area, we change this tag to <h1>. We add <h2> tag in the "Share" heading and we replace the broken <h4> tag above adding new styles. --- app/assets/stylesheets/legislation_process.scss | 11 +++++------ app/views/legislation/questions/show.html.erb | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/assets/stylesheets/legislation_process.scss b/app/assets/stylesheets/legislation_process.scss index 3cd63e889b85..c11a24c63085 100644 --- a/app/assets/stylesheets/legislation_process.scss +++ b/app/assets/stylesheets/legislation_process.scss @@ -187,16 +187,14 @@ .quiz-header-title { font-size: $small-font-size; - font-weight: 700; margin-bottom: 0; text-transform: uppercase; } - } - - h4 a { - @include brand-color; - &:hover { + a { + @include brand-color; + @include header-font-size(h4); + font-weight: 700; text-decoration: none; } } @@ -232,6 +230,7 @@ } .quiz-question { + @include header-font-size(h2); margin-bottom: $line-height; } diff --git a/app/views/legislation/questions/show.html.erb b/app/views/legislation/questions/show.html.erb index 5544ef163aef..7663fab7445a 100644 --- a/app/views/legislation/questions/show.html.erb +++ b/app/views/legislation/questions/show.html.erb @@ -5,7 +5,7 @@ <div class="small-12 medium-9 column"> <div class="quiz-title"> <p class="quiz-header-title"><%= t("legislation.questions.show.title") %></p> - <h4><%= link_to @process.title, @process %></h4> + <strong><%= link_to @process.title, @process %></strong> </div> </div> <div class="small-12 medium-3 column"> @@ -28,7 +28,7 @@ </div> <div class="row"> <div class="small-12 medium-9 column"> - <h3 class="quiz-question"><%= @question.title %></h3> + <h1 class="quiz-question"><%= @question.title %></h1> <%= AdminWYSIWYGSanitizer.new.sanitize(@question.description) %> <div class="debate-questions" id="legislation-answer-form"> <%= render "answer_form", process: @process, question: @question, answer: @answer %> @@ -37,7 +37,7 @@ <aside class="small-12 medium-3 column"> <div id="social-share" class="sidebar-divider"></div> - <h3><%= t("legislation.questions.show.share") %></h3> + <h2><%= t("legislation.questions.show.share") %></h2> <%= render "/shared/social_share", title: @question.title, url: legislation_process_question_url(@question.process, @question) %> </aside> </div>