Skip to content

Commit

Permalink
Merge pull request #1656 from alphagov/role-alert-on-feedback-elements
Browse files Browse the repository at this point in the history
Add role alert to feedback component confirmation
  • Loading branch information
owenatgov authored Aug 21, 2020
2 parents 8fe197a + 4aa6b92 commit f87ecf2
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

* Hide priority breadcrumb from transition content tagged to a step by step ([PR #1654](https://github.com/alphagov/govuk_publishing_components/pull/1654))
* Use collapsible breadcrumbs from govuk-frontend ([PR #1552](https://github.com/alphagov/govuk_publishing_components/pull/1552))
* Add role alert to feedback component confirmation ([PR #1656](https://github.com/alphagov/govuk_publishing_components/pull/1656))

## 21.62.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,34 @@
data-track-action="GOV.UK Close Form"
aria-controls="something-is-wrong"
aria-expanded="true"
role="button">Close</a>
role="button"><%= t("components.feedback.close", default: "Close") %></a>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<div class="gem-c-feedback__error-summary gem-c-feedback__js-show js-hidden js-errors" tabindex="-1"></div>

<input type="hidden" name="url" value="<%= url_without_pii %>">

<h3 class="gem-c-feedback__form-heading">Help us improve GOV.UK</h3>
<p id="feedback_explanation" class="gem-c-feedback__form-paragraph">Don’t include personal or financial information like your National Insurance number or credit card details.</p>
<h3 class="gem-c-feedback__form-heading"><%= t("components.feedback.help_us_improve_govuk", default: "Help us improve GOV.UK") %></h3>
<p id="feedback_explanation" class="gem-c-feedback__form-paragraph"><%= t("components.feedback.dont_include_personal_info", default: "Don’t include personal or financial information like your National Insurance number or credit card details.") %></p>

<%= render "govuk_publishing_components/components/input", {
label: {
text: "What were you doing?"
text: t("components.feedback.what_doing", default: "What were you doing?")
},
name: "what_doing",
describedby: "feedback_explanation"
} %>

<%= render "govuk_publishing_components/components/input", {
label: {
text: "What went wrong?"
text: t("components.feedback.what_wrong", default: "What went wrong?")
},
name: "what_wrong"
} %>

<%= render "govuk_publishing_components/components/button", {
text: "Send"
text: t("components.feedback.send", default: "Send")
} %>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
data-track-action="ffFormClose"
aria-controls="page-is-not-useful"
aria-expanded="true"
role="button">Close</a>
role="button"><%= t("components.feedback.close", default: "Close") %></a>

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds" id="survey-wrapper">
Expand All @@ -19,21 +19,21 @@
<input name="email_survey_signup[survey_id]" type="hidden" value="footer_satisfaction_survey">
<input name="email_survey_signup[survey_source]" type="hidden" value="<%= path_without_pii %>">

<h3 class="gem-c-feedback__form-heading">Help us improve GOV.UK</h3>
<p id="survey_explanation" class="gem-c-feedback__form-paragraph">To help us improve GOV.UK, we’d like to know more about your visit today. We’ll send you a link to a feedback form. It will take only 2 minutes to fill in. Don’t worry we won’t send you spam or share your email address with anyone.</p>
<h3 class="gem-c-feedback__form-heading"><%= t("components.feedback.help_us_improve_govuk", default: "Help us improve GOV.UK") %></h3>
<p id="survey_explanation" class="gem-c-feedback__form-paragraph"><%= t("components.feedback.more_about_visit", default: "To help us improve GOV.UK, we’d like to know more about your visit today. We’ll send you a link to a feedback form. It will take only 2 minutes to fill in. Don’t worry we won’t send you spam or share your email address with anyone.") %></p>

<%= render "govuk_publishing_components/components/input", {
label: {
text: "Email address"
text: t("components.feedback.email_address", default: "Email address")
},
name: "email_survey_signup[email_address]",
type: "email",
autocomplete: "email",
describedby: "survey_explanation"
} %>

<%= render "govuk_publishing_components/components/button", {
text: "Send me the survey",
<%= render "govuk_publishing_components/components/button", {
text: t("components.feedback.send_me_survey", default: "Send me the survey"),
} %>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<div class="gem-c-feedback__prompt gem-c-feedback__js-show js-prompt" tabindex="-1">
<div class="gem-c-feedback__prompt-questions js-prompt-questions">
<h2 class="gem-c-feedback__prompt-question">Is this page useful?</h2>
<h2 class="gem-c-feedback__prompt-question"><%= t("components.feedback.is_this_page_useful", default: "Is this page useful?") %></h2>
<!-- Maybe button exists only to try and capture clicks by bots -->
<%= link_to contact_govuk_path, {
<%= link_to t("components.feedback.maybe", default: "Maybe"), contact_govuk_path, {
class: 'gem-c-feedback__prompt-link',
data: {
'track-category' => 'yesNoFeedbackForm',
Expand All @@ -17,9 +17,7 @@
style: 'display: none;',
hidden: 'hidden',
'aria-hidden': 'true',
} do %>
Maybe
<% end %>
} %>
<ul class="gem-c-feedback__option-list">
<li class="gem-c-feedback__option-list-item">
<%= link_to contact_govuk_path, {
Expand All @@ -31,7 +29,7 @@
'aria-expanded': false,
role: 'button',
} do %>
Yes <span class="govuk-visually-hidden">this page is useful</span>
<%= t("components.feedback.yes", default: "Yes") %> <span class="govuk-visually-hidden"><%= t("components.feedback.is_useful", default: "this page is useful") %></span>
<% end %>
</li>
<li class="gem-c-feedback__option-list-item">
Expand All @@ -45,13 +43,13 @@
'aria-expanded': false,
role: 'button',
} do %>
No <span class="govuk-visually-hidden">this page is not useful</span>
<%= t("components.feedback.no", default: "No") %> <span class="govuk-visually-hidden"><%= t("components.feedback.is_not_useful", default: "this page is not useful") %></span>
<% end %>
</li>
</ul>
</div>
<div class="gem-c-feedback__prompt-questions gem-c-feedback__prompt-success js-prompt-success js-hidden" tabindex="-1">
Thank you for your feedback
<div class="gem-c-feedback__prompt-questions gem-c-feedback__prompt-success js-prompt-success js-hidden" role="alert">
<%= t("components.feedback.thank_you_for_feedback", default: "Thank you for your feedback") %>
</div>
<div class="gem-c-feedback__prompt-questions gem-c-feedback__prompt-questions--something-is-wrong js-prompt-questions">
<%= link_to contact_govuk_path, {
Expand All @@ -64,7 +62,7 @@
'aria-expanded': false,
role: 'button',
} do %>
Is there anything wrong with this page?
<%= t("components.feedback.anything_wrong", default: "Is there anything wrong with this page?") %>
<% end %>
</div>
</div>
18 changes: 18 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ en:
or: 'or'
contents_list:
contents: Contents
feedback:
is_this_page_useful: "Is this page useful?"
yes: "Yes"
no: "No"
maybe: "Maybe"
is_useful: "this page is useful"
is_not_useful: "this page is not useful"
thank_you_for_feedback: "Thank you for your feedback"
anything_wrong: "Is there anything wrong with this page?"
close: "Close"
help_us_improve_govuk: "Help us improve GOV.UK"
more_about_visit: "To help us improve GOV.UK, we’d like to know more about your visit today. We’ll send you a link to a feedback form. It will take only 2 minutes to fill in. Don’t worry we won’t send you spam or share your email address with anyone."
dont_include_personal_info: "Don’t include personal or financial information like your National Insurance number or credit card details."
email_address: "Email address"
what_doing: "What were you doing?"
what_wrong: "What went wrong?"
send_me_survey: "Send me the survey"
send: "Send"
organisation_schema:
all_content_search_description: "Find all content from %{organisation}"
radio:
Expand Down

0 comments on commit f87ecf2

Please sign in to comment.