Skip to content

Commit

Permalink
Update feedback component to add "display none" to "maybe" (spam prev…
Browse files Browse the repository at this point in the history
…ention) button
  • Loading branch information
jon-kirwan committed Jan 12, 2022
1 parent c080e57 commit dae8d47
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
## Unreleased

* Make metadata component "See all updates" link href less generic ([PR #2562](https://github.com/alphagov/govuk_publishing_components/pull/2562))
* Update feedback component to add "display none" to "maybe" (spam prevention) button ([PR #2568](https://github.com/alphagov/govuk_publishing_components/pull/2568))

## 28.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@
}
}

.gem-c-feedback__option-list-item:first-child {
.gem-c-feedback__option-list-item:last-child {
@include govuk-media-query($from: mobile) {
margin-right: govuk-spacing(4);
margin-left: govuk-spacing(4);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
<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" hidden>
<h2 class="gem-c-feedback__prompt-question"><%= t("components.feedback.is_this_page_useful") %></h2>
<!-- Maybe button exists only to try and capture clicks by bots -->
<button data-track-category="yesNoFeedbackForm" data-track-action="ffMaybeClick" aria-expanded="false" hidden>
<%= t("components.feedback.maybe") %>
</button>

<ul class="gem-c-feedback__option-list">
<li class="gem-c-feedback__option-list-item" style="display: none" hidden="hidden">
<!-- Maybe button exists only to try and capture clicks by bots -->
<button data-track-category="yesNoFeedbackForm" data-track-action="ffMaybeClick" aria-expanded="false" style="display: none" hidden="hidden" aria-hidden="true">
<%= t("components.feedback.maybe") %>
</button>
</li>
<li class="gem-c-feedback__option-list-item">
<button class="govuk-button gem-c-feedback__prompt-link js-page-is-useful" data-track-category="yesNoFeedbackForm" data-track-action="ffYesClick">
<%= t("components.feedback.yes") %> <span class="govuk-visually-hidden"><%= t("components.feedback.is_useful") %></span>
Expand Down

0 comments on commit dae8d47

Please sign in to comment.