govuk_publishing_components 21.27.1 → 21.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +9 -9
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +17 -2
- data/app/controllers/govuk_publishing_components/component_guide_controller.rb +6 -6
- data/app/models/govuk_publishing_components/component_doc.rb +1 -1
- data/app/models/govuk_publishing_components/component_docs.rb +2 -2
- data/app/models/govuk_publishing_components/component_example.rb +4 -4
- data/app/views/govuk_publishing_components/components/_input.html.erb +11 -0
- data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +2 -2
- data/app/views/govuk_publishing_components/components/docs/button.yml +9 -1
- data/app/views/govuk_publishing_components/components/docs/input.yml +7 -0
- data/config/routes.rb +5 -5
- data/lib/generators/govuk_publishing_components/component_generator.rb +7 -7
- data/lib/govuk_publishing_components.rb +2 -2
- data/lib/govuk_publishing_components/app_helpers/taxon_breadcrumbs.rb +1 -1
- data/lib/govuk_publishing_components/engine.rb +1 -1
- data/lib/govuk_publishing_components/minitest/component_guide_test.rb +4 -4
- data/lib/govuk_publishing_components/presenters/breadcrumbs.rb +9 -9
- data/lib/govuk_publishing_components/presenters/button_helper.rb +20 -10
- data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +2 -2
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_parent.rb +1 -1
- data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +3 -3
- data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +5 -5
- data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +5 -5
- data/lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb +5 -5
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +3 -3
- data/lib/govuk_publishing_components/presenters/machine_readable/article_schema.rb +1 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/creative_work_schema.rb +9 -9
- data/lib/govuk_publishing_components/presenters/machine_readable/dataset_schema.rb +2 -2
- data/lib/govuk_publishing_components/presenters/machine_readable/faq_page_schema.rb +3 -3
- data/lib/govuk_publishing_components/presenters/machine_readable/government_service_schema.rb +10 -10
- data/lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb +1 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/is_part_of_schema.rb +1 -1
- data/lib/govuk_publishing_components/presenters/machine_readable/organisation_schema.rb +5 -5
- data/lib/govuk_publishing_components/presenters/machine_readable/person_schema.rb +3 -3
- data/lib/govuk_publishing_components/presenters/machine_readable/potential_search_action_schema.rb +3 -3
- data/lib/govuk_publishing_components/presenters/meta_tags.rb +6 -6
- data/lib/govuk_publishing_components/presenters/organisation_logo_helper.rb +1 -1
- data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +3 -3
- data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +32 -32
- data/lib/govuk_publishing_components/presenters/schema_org.rb +13 -13
- data/lib/govuk_publishing_components/presenters/select.rb +1 -1
- data/lib/govuk_publishing_components/presenters/step_by_step_nav_helper.rb +9 -9
- data/lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb +1 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/lib/tasks/govuk_publishing_components_tasks.rake +7 -7
- data/node_modules/axe-core/CHANGELOG.md +18 -0
- data/node_modules/axe-core/README.md +9 -6
- data/node_modules/axe-core/axe.js +71 -20
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/bower.json +1 -1
- data/node_modules/axe-core/doc/API.md +4 -7
- data/node_modules/axe-core/doc/backwards-compatibility-doc.md +2 -1
- data/node_modules/axe-core/doc/rule-descriptions.md +129 -91
- data/node_modules/axe-core/lib/checks/aria/invalidrole.js +12 -9
- data/node_modules/axe-core/lib/checks/keyboard/page-has-elm.js +1 -1
- data/node_modules/axe-core/lib/checks/language/has-lang.js +10 -5
- data/node_modules/axe-core/lib/checks/navigation/region.js +7 -2
- data/node_modules/axe-core/lib/commons/aria/index.js +6 -11
- data/node_modules/axe-core/lib/commons/dom/url-props-from-attribute.js +15 -6
- data/node_modules/axe-core/lib/core/utils/get-check-message.js +21 -0
- data/node_modules/axe-core/lib/rules/area-alt.json +2 -0
- data/node_modules/axe-core/lib/rules/aria-roles.json +1 -0
- data/node_modules/axe-core/lib/rules/color-contrast-matches.js +26 -0
- data/node_modules/axe-core/lib/rules/label-content-name-mismatch-matches.js +4 -1
- data/node_modules/axe-core/lib/rules/no-empty-role-matches.js +9 -0
- data/node_modules/axe-core/lib/rules/skip-link-matches.js +1 -1
- data/node_modules/axe-core/package.json +12 -12
- data/node_modules/axe-core/sri-history.json +4 -0
- data/node_modules/govuk-frontend/govuk/all.js +21 -31
- data/node_modules/govuk-frontend/govuk/components/button/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1 -1
- data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/footer/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/header/template.njk +1 -1
- data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +2 -2
- data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +20 -30
- data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +2 -2
- data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +47 -0
- data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +1 -1
- data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +4 -4
- data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +5 -5
- data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +29 -29
- data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -0
- data/node_modules/govuk-frontend/govuk/tools/_iff.scss +3 -1
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +1 -1
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +10 -16
- data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +10 -14
- data/node_modules/govuk-frontend/package.json +10 -10
- metadata +32 -16
@@ -10,6 +10,32 @@ if (
|
|
10
10
|
return false;
|
11
11
|
}
|
12
12
|
|
13
|
+
// form elements that don't have direct child text nodes need to check that
|
14
|
+
// the text indent has not been changed and moved the text away from the
|
15
|
+
// control
|
16
|
+
const formElements = ['INPUT', 'SELECT', 'TEXTAREA'];
|
17
|
+
if (formElements.includes(nodeName)) {
|
18
|
+
const style = window.getComputedStyle(node);
|
19
|
+
const textIndent = parseInt(style.getPropertyValue('text-indent'), 10);
|
20
|
+
|
21
|
+
if (textIndent) {
|
22
|
+
// since we can't get the actual bounding rect of the text node, we'll
|
23
|
+
// use the current nodes bounding rect and adjust by the text-indent to
|
24
|
+
// see if it still overlaps the node
|
25
|
+
let rect = node.getBoundingClientRect();
|
26
|
+
rect = {
|
27
|
+
top: rect.top,
|
28
|
+
bottom: rect.bottom,
|
29
|
+
left: rect.left + textIndent,
|
30
|
+
right: rect.right + textIndent
|
31
|
+
};
|
32
|
+
|
33
|
+
if (!axe.commons.dom.visuallyOverlaps(rect, node)) {
|
34
|
+
return false;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
13
39
|
if (nodeName === 'INPUT') {
|
14
40
|
return (
|
15
41
|
['hidden', 'range', 'color', 'checkbox', 'radio', 'image'].indexOf(
|
@@ -12,7 +12,10 @@ if (!role) {
|
|
12
12
|
return false;
|
13
13
|
}
|
14
14
|
|
15
|
-
const
|
15
|
+
const widgetRoles = Object.keys(aria.lookupTable.role).filter(
|
16
|
+
key => aria.lookupTable.role[key].type === `widget`
|
17
|
+
);
|
18
|
+
const isWidgetType = widgetRoles.includes(role);
|
16
19
|
if (!isWidgetType) {
|
17
20
|
return false;
|
18
21
|
}
|
@@ -1 +1 @@
|
|
1
|
-
return axe.commons.dom.isSkipLink(node);
|
1
|
+
return axe.commons.dom.isSkipLink(node) && axe.commons.dom.isOffscreen(node);
|
@@ -15,13 +15,13 @@
|
|
15
15
|
],
|
16
16
|
"_from": "axe-core@>=3.5.0 <4.0.0",
|
17
17
|
"_hasShrinkwrap": false,
|
18
|
-
"_id": "axe-core@3.5.
|
18
|
+
"_id": "axe-core@3.5.2",
|
19
19
|
"_inCache": true,
|
20
20
|
"_location": "/axe-core",
|
21
21
|
"_nodeVersion": "10.19.0",
|
22
22
|
"_npmOperationalInternal": {
|
23
23
|
"host": "s3://npm-registry-packages",
|
24
|
-
"tmp": "tmp/axe-core_3.5.
|
24
|
+
"tmp": "tmp/axe-core_3.5.2_1583784480390_0.6774198347544202"
|
25
25
|
},
|
26
26
|
"_npmUser": {
|
27
27
|
"name": "npmdeque",
|
@@ -41,8 +41,8 @@
|
|
41
41
|
"_requiredBy": [
|
42
42
|
"/"
|
43
43
|
],
|
44
|
-
"_resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.
|
45
|
-
"_shasum": "
|
44
|
+
"_resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.2.tgz",
|
45
|
+
"_shasum": "1946be7a18a05b5d37f18d339989db0d5434ebf6",
|
46
46
|
"_shrinkwrap": null,
|
47
47
|
"_spec": "axe-core@^3.5.0",
|
48
48
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
|
@@ -132,17 +132,17 @@
|
|
132
132
|
},
|
133
133
|
"directories": {},
|
134
134
|
"dist": {
|
135
|
-
"integrity": "sha512-
|
136
|
-
"shasum": "
|
137
|
-
"tarball": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.
|
138
|
-
"fileCount":
|
139
|
-
"unpackedSize":
|
140
|
-
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\
|
135
|
+
"integrity": "sha512-9wBDgdzbn06on6Xt+ay7EM4HV+NBOkeXhjK9DMezD8/qvJKeUTzheGHhM+U1uNaX4OvuIR4BePDStRLF7vyOfg==",
|
136
|
+
"shasum": "1946be7a18a05b5d37f18d339989db0d5434ebf6",
|
137
|
+
"tarball": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.2.tgz",
|
138
|
+
"fileCount": 596,
|
139
|
+
"unpackedSize": 2625684,
|
140
|
+
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZqIhCRA9TVsSAnZWagAAm4UP/3gDM5a8sDi1UnR25S9X\ntTKQWCkU9JQ/TZ3JHGGn9dAhfZX4iM/dUVhzrmFOgM+szoj6dsL3LFsKLWSD\nxzMNNSQb+7DFEmr9dwqDFAEwsEaXBWzASNtSe+/I4HOSj/WC6VrJDMP0jNKz\n+ewrj0p/tSAmQugMP2jzKflC6TwV0LhKSh4+nb9Iq9ZbwuRBx6hYUs4RE6Fd\ndnTI54RW3kiyWyDcunH9zRalSkIS0JQtSmiJYWqBpKcw2te2GpH77ZbJLYNj\nvaIpWJLyuspRUrm+fKwX2Wxt3vNk5nHpUk4Rl/YpLuCcpFeArlSXigN1BVi4\n9I/xtmp7AolP3+xNMEp8FkxdW0hxVQ7lpUOi1d/xvSeISrBgv2MUDY3UzuNY\n6lEKeMrmpLCmre+ajQ6ekzpdZhHnJcr/B4GF8Qo+bJEJScejObxWWk6+DmYT\nubWo749QDmOdbgQ5pRKm8i3/4A7D11MY/vD0TadWyRTw+YX0g5NhDdVESNrl\nco1OvbrbDUHn7mZPdNR33xxF5ctNnNm4kdn+1EDYsaTMIoBcGvVCm3xDW2oy\nE/9VH67/vj2ptBKem87nmUfN2BD0gcv8UXKo7yfNImc3i28ncHxFK5glhinI\nonfuE/LBJVqfAO0VK89rYvbqbph6/S4Sgvj4dxYMDPm3HOnh5rkowqmj2Eps\ntihd\r\n=oY27\r\n-----END PGP SIGNATURE-----\r\n"
|
141
141
|
},
|
142
142
|
"engines": {
|
143
143
|
"node": ">=4"
|
144
144
|
},
|
145
|
-
"gitHead": "
|
145
|
+
"gitHead": "15ff7eb910681dac1745b360fb0e37ef2eb1d435",
|
146
146
|
"homepage": "https://www.deque.com/axe/",
|
147
147
|
"keywords": [
|
148
148
|
"Accessibility",
|
@@ -218,5 +218,5 @@
|
|
218
218
|
}
|
219
219
|
},
|
220
220
|
"typings": "axe.d.ts",
|
221
|
-
"version": "3.5.
|
221
|
+
"version": "3.5.2"
|
222
222
|
}
|
@@ -174,5 +174,9 @@
|
|
174
174
|
"3.5.1": {
|
175
175
|
"axe.js": "sha256-J5+J6tFJyKx7Jyn9xK3rJhAyJCGAPR6kOwzXjpdFbEM=",
|
176
176
|
"axe.min.js": "sha256-wo0QYtgoayRMifoYIHc8Spw5NmeFN4ojGLSqmrUuhX8="
|
177
|
+
},
|
178
|
+
"3.5.2": {
|
179
|
+
"axe.js": "sha256-wf7AYQ0YxwohIAqhYIfQ6y1VDQmP2zbgGhL6mb8a+Eg=",
|
180
|
+
"axe.min.js": "sha256-suutTbfowm19n2znRYpsLOcHOkwv9g+ximjS8TLJ6/8="
|
177
181
|
}
|
178
182
|
}
|
@@ -1748,7 +1748,7 @@ Checkboxes.prototype.handleClick = function (event) {
|
|
1748
1748
|
|
1749
1749
|
if (detect) return
|
1750
1750
|
|
1751
|
-
|
1751
|
+
// Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
|
1752
1752
|
Element.prototype.closest = function closest(selector) {
|
1753
1753
|
var node = this;
|
1754
1754
|
|
@@ -2026,51 +2026,41 @@ Radios.prototype.handleClick = function (event) {
|
|
2026
2026
|
|
2027
2027
|
(function(undefined) {
|
2028
2028
|
|
2029
|
-
// Detection from https://
|
2029
|
+
// Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/detect.js
|
2030
2030
|
var detect = (
|
2031
|
-
'
|
2031
|
+
'document' in this && "nextElementSibling" in document.documentElement
|
2032
2032
|
);
|
2033
2033
|
|
2034
2034
|
if (detect) return
|
2035
2035
|
|
2036
|
-
|
2037
|
-
(
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
while (el && el.nodeType !== 1) { el = el.nextSibling; }
|
2045
|
-
return el;
|
2046
|
-
}
|
2047
|
-
});
|
2048
|
-
|
2049
|
-
}(this));
|
2036
|
+
// Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/polyfill.js
|
2037
|
+
Object.defineProperty(Element.prototype, "nextElementSibling", {
|
2038
|
+
get: function(){
|
2039
|
+
var el = this.nextSibling;
|
2040
|
+
while (el && el.nodeType !== 1) { el = el.nextSibling; }
|
2041
|
+
return el;
|
2042
|
+
}
|
2043
|
+
});
|
2050
2044
|
|
2051
2045
|
}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
2052
2046
|
|
2053
2047
|
(function(undefined) {
|
2054
2048
|
|
2055
|
-
// Detection from https://
|
2049
|
+
// Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/detect.js
|
2056
2050
|
var detect = (
|
2057
|
-
'
|
2051
|
+
'document' in this && "previousElementSibling" in document.documentElement
|
2058
2052
|
);
|
2059
2053
|
|
2060
2054
|
if (detect) return
|
2061
2055
|
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
}
|
2071
|
-
});
|
2072
|
-
|
2073
|
-
}(this));
|
2056
|
+
// Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/polyfill.js
|
2057
|
+
Object.defineProperty(Element.prototype, 'previousElementSibling', {
|
2058
|
+
get: function(){
|
2059
|
+
var el = this.previousSibling;
|
2060
|
+
while (el && el.nodeType !== 1) { el = el.previousSibling; }
|
2061
|
+
return el;
|
2062
|
+
}
|
2063
|
+
});
|
2074
2064
|
|
2075
2065
|
}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
2076
2066
|
|
@@ -24,7 +24,7 @@
|
|
24
24
|
{#- The SVG needs `focusable="false"` so that Internet Explorer does not
|
25
25
|
treat it as an interactive element - without this it will be
|
26
26
|
'focusable' when using the keyboard to navigate. #}
|
27
|
-
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40"
|
27
|
+
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false">
|
28
28
|
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"/>
|
29
29
|
</svg>
|
30
30
|
{% endset %}
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"name": "errorMessage",
|
60
60
|
"type": "object",
|
61
61
|
"required": false,
|
62
|
-
"description": "Options for the
|
62
|
+
"description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.",
|
63
63
|
"isComponent": true
|
64
64
|
},
|
65
65
|
{
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"name": "errorMessage",
|
24
24
|
"type": "object",
|
25
25
|
"required": false,
|
26
|
-
"description": "Options for the
|
26
|
+
"description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.",
|
27
27
|
"isComponent": true
|
28
28
|
},
|
29
29
|
{
|
@@ -78,7 +78,7 @@
|
|
78
78
|
"name": "errorMessage",
|
79
79
|
"type": "object",
|
80
80
|
"required": false,
|
81
|
-
"description": "Options for the error message.",
|
81
|
+
"description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.",
|
82
82
|
"isComponent": true
|
83
83
|
},
|
84
84
|
{
|
@@ -692,7 +692,7 @@ if (detect) return
|
|
692
692
|
|
693
693
|
if (detect) return
|
694
694
|
|
695
|
-
|
695
|
+
// Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
|
696
696
|
Element.prototype.closest = function closest(selector) {
|
697
697
|
var node = this;
|
698
698
|
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"name": "errorMessage",
|
42
42
|
"type": "object",
|
43
43
|
"required": false,
|
44
|
-
"description": "Options for the
|
44
|
+
"description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.",
|
45
45
|
"isComponent": true
|
46
46
|
},
|
47
47
|
{
|
@@ -54,7 +54,7 @@
|
|
54
54
|
treat it as an interactive element - without this it will be
|
55
55
|
'focusable' when using the keyboard to navigate. #}
|
56
56
|
<svg
|
57
|
-
|
57
|
+
aria-hidden="true"
|
58
58
|
focusable="false"
|
59
59
|
class="govuk-footer__licence-logo"
|
60
60
|
xmlns="http://www.w3.org/2000/svg"
|
@@ -17,7 +17,7 @@
|
|
17
17
|
treat it as an interactive element - without this it will be
|
18
18
|
'focusable' when using the keyboard to navigate. #}
|
19
19
|
<svg
|
20
|
-
|
20
|
+
aria-hidden="true"
|
21
21
|
focusable="false"
|
22
22
|
class="govuk-header__logotype-crown"
|
23
23
|
xmlns="http://www.w3.org/2000/svg"
|
@@ -53,7 +53,7 @@
|
|
53
53
|
"name": "errorMessage",
|
54
54
|
"type": "object",
|
55
55
|
"required": false,
|
56
|
-
"description": "Options for the
|
56
|
+
"description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.",
|
57
57
|
"isComponent": true
|
58
58
|
},
|
59
59
|
{
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"name": "errorMessage",
|
18
18
|
"type": "object",
|
19
19
|
"required": false,
|
20
|
-
"description": "Options for the
|
20
|
+
"description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.",
|
21
21
|
"isComponent": true
|
22
22
|
},
|
23
23
|
{
|
@@ -73,7 +73,7 @@
|
|
73
73
|
"name": "errorMessage",
|
74
74
|
"type": "object",
|
75
75
|
"required": false,
|
76
|
-
"description": "Options for the
|
76
|
+
"description": "Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.",
|
77
77
|
"isComponent": true
|
78
78
|
},
|
79
79
|
{
|
@@ -14,8 +14,8 @@
|
|
14
14
|
{
|
15
15
|
"name": "href",
|
16
16
|
"type": "string",
|
17
|
-
"required":
|
18
|
-
"description": "The value of the skip link href attribute. Defaults to"
|
17
|
+
"required": false,
|
18
|
+
"description": "The value of the skip link’s `href` attribute. Defaults to `#content` if you do not provide a value."
|
19
19
|
},
|
20
20
|
{
|
21
21
|
"name": "classes",
|
@@ -746,51 +746,41 @@ if (detect) return
|
|
746
746
|
|
747
747
|
(function(undefined) {
|
748
748
|
|
749
|
-
// Detection from https://
|
749
|
+
// Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/detect.js
|
750
750
|
var detect = (
|
751
|
-
'
|
751
|
+
'document' in this && "nextElementSibling" in document.documentElement
|
752
752
|
);
|
753
753
|
|
754
754
|
if (detect) return
|
755
755
|
|
756
|
-
|
757
|
-
(
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
while (el && el.nodeType !== 1) { el = el.nextSibling; }
|
765
|
-
return el;
|
766
|
-
}
|
767
|
-
});
|
768
|
-
|
769
|
-
}(this));
|
756
|
+
// Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/polyfill.js
|
757
|
+
Object.defineProperty(Element.prototype, "nextElementSibling", {
|
758
|
+
get: function(){
|
759
|
+
var el = this.nextSibling;
|
760
|
+
while (el && el.nodeType !== 1) { el = el.nextSibling; }
|
761
|
+
return el;
|
762
|
+
}
|
763
|
+
});
|
770
764
|
|
771
765
|
}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
772
766
|
|
773
767
|
(function(undefined) {
|
774
768
|
|
775
|
-
// Detection from https://
|
769
|
+
// Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/detect.js
|
776
770
|
var detect = (
|
777
|
-
'
|
771
|
+
'document' in this && "previousElementSibling" in document.documentElement
|
778
772
|
);
|
779
773
|
|
780
774
|
if (detect) return
|
781
775
|
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
}
|
791
|
-
});
|
792
|
-
|
793
|
-
}(this));
|
776
|
+
// Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/polyfill.js
|
777
|
+
Object.defineProperty(Element.prototype, 'previousElementSibling', {
|
778
|
+
get: function(){
|
779
|
+
var el = this.previousSibling;
|
780
|
+
while (el && el.nodeType !== 1) { el = el.previousSibling; }
|
781
|
+
return el;
|
782
|
+
}
|
783
|
+
});
|
794
784
|
|
795
785
|
}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
|
796
786
|
|
@@ -24,9 +24,9 @@
|
|
24
24
|
{% for item in params.items %}
|
25
25
|
{% if item %}
|
26
26
|
{% set id = item.id if item.id else idPrefix + "-" + loop.index %}
|
27
|
-
<
|
27
|
+
<div class="govuk-tabs__panel{% if loop.index > 1 %} govuk-tabs__panel--hidden{% endif %}" id="{{ id }}"{% for attribute, value in item.panel.attributes %} {{attribute}}="{{value}}"{% endfor %}>
|
28
28
|
{{ item.panel.html | safe if item.panel.html else item.panel.text }}
|
29
|
-
</
|
29
|
+
</div>
|
30
30
|
{% endif %}
|
31
31
|
{% endfor %}
|
32
32
|
</div>
|
@@ -38,7 +38,54 @@
|
|
38
38
|
}
|
39
39
|
}
|
40
40
|
|
41
|
+
// Deprecated. We'll remove this class in a future release. Use `.govuk-tag--grey` instead.
|
41
42
|
.govuk-tag--inactive {
|
42
43
|
background-color: govuk-colour("dark-grey", $legacy: "grey-1");
|
43
44
|
}
|
45
|
+
|
46
|
+
.govuk-tag--grey {
|
47
|
+
color: govuk-shade(govuk-colour("dark-grey", $legacy: "grey-1"), 30);
|
48
|
+
background: govuk-tint(govuk-colour("dark-grey", $legacy: "grey-1"), 90);
|
49
|
+
}
|
50
|
+
|
51
|
+
.govuk-tag--purple {
|
52
|
+
color: govuk-shade(govuk-colour("purple"), 20);
|
53
|
+
background: govuk-tint(govuk-colour("purple"), 80);
|
54
|
+
}
|
55
|
+
|
56
|
+
.govuk-tag--turquoise {
|
57
|
+
color: govuk-shade(govuk-colour("turquoise"), 60);
|
58
|
+
background: govuk-tint(govuk-colour("turquoise"), 70);
|
59
|
+
}
|
60
|
+
|
61
|
+
.govuk-tag--blue {
|
62
|
+
color: govuk-shade(govuk-colour("blue"), 30);
|
63
|
+
background: govuk-tint(govuk-colour("blue"), 80);
|
64
|
+
}
|
65
|
+
|
66
|
+
.govuk-tag--yellow {
|
67
|
+
color: govuk-shade(govuk-colour("yellow"), 65);
|
68
|
+
background: govuk-tint(govuk-colour("yellow"), 75);
|
69
|
+
}
|
70
|
+
|
71
|
+
.govuk-tag--orange {
|
72
|
+
color: govuk-shade(govuk-colour("orange"), 55);
|
73
|
+
background: govuk-tint(govuk-colour("orange"), 70);
|
74
|
+
}
|
75
|
+
|
76
|
+
.govuk-tag--red {
|
77
|
+
color: govuk-shade(govuk-colour("red"), 30);
|
78
|
+
background: govuk-tint(govuk-colour("red"), 80);
|
79
|
+
}
|
80
|
+
|
81
|
+
.govuk-tag--pink {
|
82
|
+
color: govuk-shade(govuk-colour("pink"), 40);
|
83
|
+
background: govuk-tint(govuk-colour("pink"), 80);
|
84
|
+
}
|
85
|
+
|
86
|
+
.govuk-tag--green {
|
87
|
+
color: govuk-shade(govuk-colour("green"), 20);
|
88
|
+
background: govuk-tint(govuk-colour("green"), 80);
|
89
|
+
}
|
90
|
+
|
44
91
|
}
|