Skip to content

Commit

Permalink
Merge pull request #189 from ministryofjustice/errors-are-h1
Browse files Browse the repository at this point in the history
Make errors H2, move below H1
  • Loading branch information
axemonkey authored Jun 15, 2016
2 parents 2aa7169 + a590404 commit 3f03d7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/views/questions/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
= t('title', scope: @form.i18n_scope)
= ' - '

= render('shared/error_block', form: @form) if @form.errors.any?

h1.heading-large
span.heading-secondary= t('breadcrumb', scope: @form.i18n_scope)
span.visuallyhidden
| : 
= t('text', scope: @form.i18n_scope)

= render('shared/error_block', form: @form) if @form.errors.any?

=render("questions/headers/#{@form.id}")

= form_for @form, as: @form.id, url: question_path(@question), html: { autocomplete: @form.autocomplete, method: :put } do |f|
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_error_block.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.error-summary role="group" aria-labelledby="error-summary-heading-example-1" tabindex="-1"
h1.heading-medium.error-summary-heading#error-summary-heading-example-1 You need to fix the errors on this page before continuing.
h2.heading-medium.error-summary-heading#error-summary-heading-example-1 You need to fix the errors on this page before continuing.
span.visuallyhidden Errors are listed as links below, click to select the field that needs correcting.
ul.error-summary-list
- form.errors.each do |field, message|
Expand Down

0 comments on commit 3f03d7d

Please sign in to comment.