govuk_publishing_components 38.3.1 → 38.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +16 -1
- data/app/views/govuk_publishing_components/components/feedback/_survey_signup_form.html.erb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/README.md +2 -2
- data/node_modules/axe-core/axe.js +5099 -5203
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/locales/README.md +9 -0
- data/node_modules/axe-core/locales/_template.json +4 -2
- data/node_modules/axe-core/locales/de.json +10 -4
- data/node_modules/axe-core/locales/ja.json +1 -1
- data/node_modules/axe-core/package.json +8 -3
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4722ee8913bce56729719e8dde26b88d7958e23fd8c6177a12bcfb67b91a0c6
|
4
|
+
data.tar.gz: 77afa0a3c76a84f04523dbd435d18dc92feb1615a106efe301e3e9e78f743c69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8861808afb26f285beb8cf3c8a91bd19a7cf076b44a784bf6da5167e24e10c643eb744bd5c0b87cbaf65c358d525a81441fd25d477e14c16b7233428b2fd7e61
|
7
|
+
data.tar.gz: 4baa708a0bede0ac54705a63d0fc2bc2a8d957ccae3d4b59b35e2dd8fa75ce62db1e4a7b0c4f6bedbf3c3e1751878732112b0fef1beba648a2a5d4a3abf5287b
|
@@ -26,7 +26,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
26
26
|
Feedback.prototype.init = function () {
|
27
27
|
this.setInitialAriaAttributes()
|
28
28
|
this.setHiddenValues()
|
29
|
-
|
29
|
+
this.setSurveyPath()
|
30
30
|
this.prompt.hidden = false
|
31
31
|
for (var k = 0; k < this.promptQuestions.length; k++) {
|
32
32
|
this.promptQuestions[k].hidden = false
|
@@ -151,6 +151,21 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
151
151
|
this.somethingIsWrongForm.appendChild(this.timerHoneyPot)
|
152
152
|
}
|
153
153
|
|
154
|
+
// This getter is needed for spyOn in tests
|
155
|
+
Feedback.prototype.getPagePath = function () {
|
156
|
+
return window.location.pathname
|
157
|
+
}
|
158
|
+
|
159
|
+
Feedback.prototype.setSurveyPath = function () {
|
160
|
+
var surveyLink = this.$module.querySelector('#survey_explanation a')
|
161
|
+
|
162
|
+
if (surveyLink) {
|
163
|
+
var pathWithoutEmailPII = this.getPagePath().replace(/[^\s=?&]+(?:@|%40)[^\s=?&]+/, '[email]')
|
164
|
+
var encodedPath = encodeURI(pathWithoutEmailPII)
|
165
|
+
surveyLink.setAttribute('href', 'https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=' + encodedPath)
|
166
|
+
}
|
167
|
+
}
|
168
|
+
|
154
169
|
Feedback.prototype.updateAriaAttributes = function (linkClicked) {
|
155
170
|
linkClicked.setAttribute('aria-expanded', true)
|
156
171
|
}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<h3 class="gem-c-feedback__form-heading"><%= t("components.feedback.help_us_improve_govuk") %></h3>
|
11
11
|
<p id="survey_explanation" class="gem-c-feedback__form-paragraph">
|
12
12
|
<%= t("components.feedback.more_about_visit") %>
|
13
|
-
<a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c
|
13
|
+
<a href="https://www.smartsurvey.co.uk/s/gov-uk-banner/?c=no-js" class="govuk-link" target="_blank" rel="noopener noreferrer external">Please fill in this survey (opens in a new tab)</a>.
|
14
14
|
</p>
|
15
15
|
<button
|
16
16
|
class="govuk-button govuk-button--secondary js-close-form"
|
@@ -103,9 +103,9 @@ or equivalently:
|
|
103
103
|
|
104
104
|
This will create a new build for axe, called `axe.<lang>.js` and `axe.<lang>.min.js`. If you want to build all localized versions, simply pass in `--all-lang` instead. If you want to build multiple localized versions (but not all of them), you can pass in a comma-separated list of languages to the `--lang` flag, like `--lang=nl,ja`.
|
105
105
|
|
106
|
-
To create a new translation for axe, start by running `grunt translate --lang=<langcode>`. This will create a json file
|
106
|
+
To create a new translation for axe, start by running `grunt translate --lang=<langcode>`. This will create a json file in the `./locales` directory, with the default English text in it for you to translate. Alternatively, you could copy `./locales/_template.json`. We welcome any localization for axe-core. For details on how to contribute, see the Contributing section below. For details on the message syntax, see [Check Message Template](/doc/check-message-template.md).
|
107
107
|
|
108
|
-
To update existing translation file, re-run `grunt translate --lang=<langcode>`. This will add new messages used in English and remove messages which were not used in English.
|
108
|
+
To update an existing translation file, re-run `grunt translate --lang=<langcode>`. This will add new messages used in English and remove messages which were not used in English.
|
109
109
|
|
110
110
|
Additionally, locale can be applied at runtime by passing a `locale` object to `axe.configure()`. The locale object must be of the same shape as existing locales in the `./locales` directory. For example:
|
111
111
|
|