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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +9 -9
  3. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +17 -2
  4. data/app/controllers/govuk_publishing_components/component_guide_controller.rb +6 -6
  5. data/app/models/govuk_publishing_components/component_doc.rb +1 -1
  6. data/app/models/govuk_publishing_components/component_docs.rb +2 -2
  7. data/app/models/govuk_publishing_components/component_example.rb +4 -4
  8. data/app/views/govuk_publishing_components/components/_input.html.erb +11 -0
  9. data/app/views/govuk_publishing_components/components/_previous_and_next_navigation.html.erb +2 -2
  10. data/app/views/govuk_publishing_components/components/docs/button.yml +9 -1
  11. data/app/views/govuk_publishing_components/components/docs/input.yml +7 -0
  12. data/config/routes.rb +5 -5
  13. data/lib/generators/govuk_publishing_components/component_generator.rb +7 -7
  14. data/lib/govuk_publishing_components.rb +2 -2
  15. data/lib/govuk_publishing_components/app_helpers/taxon_breadcrumbs.rb +1 -1
  16. data/lib/govuk_publishing_components/engine.rb +1 -1
  17. data/lib/govuk_publishing_components/minitest/component_guide_test.rb +4 -4
  18. data/lib/govuk_publishing_components/presenters/breadcrumbs.rb +9 -9
  19. data/lib/govuk_publishing_components/presenters/button_helper.rb +20 -10
  20. data/lib/govuk_publishing_components/presenters/checkboxes_helper.rb +2 -2
  21. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_parent.rb +1 -1
  22. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_taxons.rb +3 -3
  23. data/lib/govuk_publishing_components/presenters/contents_list_helper.rb +5 -5
  24. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +5 -5
  25. data/lib/govuk_publishing_components/presenters/curated_taxonomy_sidebar_links.rb +5 -5
  26. data/lib/govuk_publishing_components/presenters/image_card_helper.rb +3 -3
  27. data/lib/govuk_publishing_components/presenters/machine_readable/article_schema.rb +1 -1
  28. data/lib/govuk_publishing_components/presenters/machine_readable/creative_work_schema.rb +9 -9
  29. data/lib/govuk_publishing_components/presenters/machine_readable/dataset_schema.rb +2 -2
  30. data/lib/govuk_publishing_components/presenters/machine_readable/faq_page_schema.rb +3 -3
  31. data/lib/govuk_publishing_components/presenters/machine_readable/government_service_schema.rb +10 -10
  32. data/lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb +1 -1
  33. data/lib/govuk_publishing_components/presenters/machine_readable/is_part_of_schema.rb +1 -1
  34. data/lib/govuk_publishing_components/presenters/machine_readable/organisation_schema.rb +5 -5
  35. data/lib/govuk_publishing_components/presenters/machine_readable/person_schema.rb +3 -3
  36. data/lib/govuk_publishing_components/presenters/machine_readable/potential_search_action_schema.rb +3 -3
  37. data/lib/govuk_publishing_components/presenters/meta_tags.rb +6 -6
  38. data/lib/govuk_publishing_components/presenters/organisation_logo_helper.rb +1 -1
  39. data/lib/govuk_publishing_components/presenters/page_with_step_by_step_navigation.rb +3 -3
  40. data/lib/govuk_publishing_components/presenters/related_navigation_helper.rb +32 -32
  41. data/lib/govuk_publishing_components/presenters/schema_org.rb +13 -13
  42. data/lib/govuk_publishing_components/presenters/select.rb +1 -1
  43. data/lib/govuk_publishing_components/presenters/step_by_step_nav_helper.rb +9 -9
  44. data/lib/govuk_publishing_components/presenters/taxonomy_list_helper.rb +1 -1
  45. data/lib/govuk_publishing_components/version.rb +1 -1
  46. data/lib/tasks/govuk_publishing_components_tasks.rake +7 -7
  47. data/node_modules/axe-core/CHANGELOG.md +18 -0
  48. data/node_modules/axe-core/README.md +9 -6
  49. data/node_modules/axe-core/axe.js +71 -20
  50. data/node_modules/axe-core/axe.min.js +2 -2
  51. data/node_modules/axe-core/bower.json +1 -1
  52. data/node_modules/axe-core/doc/API.md +4 -7
  53. data/node_modules/axe-core/doc/backwards-compatibility-doc.md +2 -1
  54. data/node_modules/axe-core/doc/rule-descriptions.md +129 -91
  55. data/node_modules/axe-core/lib/checks/aria/invalidrole.js +12 -9
  56. data/node_modules/axe-core/lib/checks/keyboard/page-has-elm.js +1 -1
  57. data/node_modules/axe-core/lib/checks/language/has-lang.js +10 -5
  58. data/node_modules/axe-core/lib/checks/navigation/region.js +7 -2
  59. data/node_modules/axe-core/lib/commons/aria/index.js +6 -11
  60. data/node_modules/axe-core/lib/commons/dom/url-props-from-attribute.js +15 -6
  61. data/node_modules/axe-core/lib/core/utils/get-check-message.js +21 -0
  62. data/node_modules/axe-core/lib/rules/area-alt.json +2 -0
  63. data/node_modules/axe-core/lib/rules/aria-roles.json +1 -0
  64. data/node_modules/axe-core/lib/rules/color-contrast-matches.js +26 -0
  65. data/node_modules/axe-core/lib/rules/label-content-name-mismatch-matches.js +4 -1
  66. data/node_modules/axe-core/lib/rules/no-empty-role-matches.js +9 -0
  67. data/node_modules/axe-core/lib/rules/skip-link-matches.js +1 -1
  68. data/node_modules/axe-core/package.json +12 -12
  69. data/node_modules/axe-core/sri-history.json +4 -0
  70. data/node_modules/govuk-frontend/govuk/all.js +21 -31
  71. data/node_modules/govuk-frontend/govuk/components/button/template.njk +1 -1
  72. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +1 -1
  73. data/node_modules/govuk-frontend/govuk/components/checkboxes/macro-options.json +1 -1
  74. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  75. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +1 -1
  76. data/node_modules/govuk-frontend/govuk/components/file-upload/macro-options.json +1 -1
  77. data/node_modules/govuk-frontend/govuk/components/footer/template.njk +1 -1
  78. data/node_modules/govuk-frontend/govuk/components/header/template.njk +1 -1
  79. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +1 -1
  80. data/node_modules/govuk-frontend/govuk/components/radios/macro-options.json +1 -1
  81. data/node_modules/govuk-frontend/govuk/components/select/macro-options.json +1 -1
  82. data/node_modules/govuk-frontend/govuk/components/skip-link/macro-options.json +2 -2
  83. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +20 -30
  84. data/node_modules/govuk-frontend/govuk/components/tabs/template.njk +2 -2
  85. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +47 -0
  86. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +1 -1
  87. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +4 -4
  88. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +5 -5
  89. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +29 -29
  90. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -0
  91. data/node_modules/govuk-frontend/govuk/tools/_iff.scss +3 -1
  92. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/closest.js +1 -1
  93. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/nextElementSibling.js +10 -16
  94. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/previousElementSibling.js +10 -14
  95. data/node_modules/govuk-frontend/package.json +10 -10
  96. metadata +32 -16
@@ -6,6 +6,8 @@
6
6
  "cat.text-alternatives",
7
7
  "wcag2a",
8
8
  "wcag111",
9
+ "wcag244",
10
+ "wcag412",
9
11
  "section508",
10
12
  "section508.22.a"
11
13
  ],
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "id": "aria-roles",
3
3
  "selector": "[role]",
4
+ "matches": "no-empty-role-matches.js",
4
5
  "tags": ["cat.aria", "wcag2a", "wcag412"],
5
6
  "metadata": {
6
7
  "description": "Ensures all elements with a role attribute use a valid value",
@@ -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 isWidgetType = aria.lookupTable.rolesOfType.widget.includes(role);
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
  }
@@ -0,0 +1,9 @@
1
+ if (!virtualNode.hasAttr('role')) {
2
+ return false;
3
+ }
4
+
5
+ if (!virtualNode.attr('role').trim()) {
6
+ return false;
7
+ }
8
+
9
+ return true;
@@ -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.1",
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.1_1581596187900_0.49027183092406457"
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.1.tgz",
45
- "_shasum": "d8d5aaef73f003e8b766ea28bb078343f3622201",
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-mwpDgPwWB+5kMHyLjlxh4w25ClJfqSxi+c6LQ4ix349TdCUctMwJNPTkhPD1qP9SYIjFgjeVpVZWCvK9oBGwCg==",
136
- "shasum": "d8d5aaef73f003e8b766ea28bb078343f3622201",
137
- "tarball": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.1.tgz",
138
- "fileCount": 594,
139
- "unpackedSize": 2610611,
140
- "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRT4cCRA9TVsSAnZWagAA02oP/1NeHgsQyTuxOmBL1bmA\nyMvWsro/yPVNoOeAv5lgATjNhRV0lTTN6DjNiRRpau5pB7accvh7Ai0mLVRs\nv6pGZ9Ob5oB9PL5eJsQlTpF6whPpWyMBbHA8IoyMUnQ2B332XWdsC+PDJiPt\nLJdVsUg/MmU79/fBKAwZnlwQu+/hi/MqYhh96NzLfs5Gf2n6q1GSdoMDdhHc\nnv/93qyApqEsyAGvH57z3FWw1Yrf3v0Tbhkt2Xm15bdRsRlbQgt6dfpYpxcf\nkG1lBxM67y6BpF3ivnyrzZwXCb5ofyyzQBKPgZT1fZ5KsC+x0bBNMV3MBv2P\njnzBpXd0qdhu9E4/MuU7Zbc2YKFHaULKKyoOoOdVm6+aSeLqZYf+fhfZanZJ\nf2a8YW0TDLEfrTkzNMGQ73lLkFkNMSp8UfYvphHdtP2v2MzJu1P48tbTJtPU\n3AwZL9OgdZAaUsTRmShGeCNCaR03mKIfW5Tw87gaFlAeipvuGPz61S3l2B2T\nK75PfNpl31g2yNsXQa7FL/DLPacd1S59HzN5MnScuevPFMkgMGiUSCujryR0\nleZmfVXEFvcVQiT6MgCxKTqV4HfeOvwuUh1NjY6zT+rVLfVFQ4HwE1rADx4U\nij3gEgLLH2OJKxFdIfwRRLJMQlFoL4apJMrsTCOcNy6U0J2n+ZbAX5GoYezr\nV3XB\r\n=KopD\r\n-----END PGP SIGNATURE-----\r\n"
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": "277142590772e72f54747534eeb0faa27df1df18",
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.1"
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
- // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
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://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-b09a5d2acf3314b46a6c8f8d0c31b85c
2029
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/detect.js
2030
2030
  var detect = (
2031
- 'Element' in this && "nextElementSibling" in document.documentElement
2031
+ 'document' in this && "nextElementSibling" in document.documentElement
2032
2032
  );
2033
2033
 
2034
2034
  if (detect) return
2035
2035
 
2036
-
2037
- (function (global) {
2038
-
2039
- // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
2040
- // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L28-L33
2041
- Object.defineProperty(Element.prototype, "nextElementSibling", {
2042
- get: function(){
2043
- var el = this.nextSibling;
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://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-a162235fbc9c0dd40d4032265f44942e
2049
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/detect.js
2056
2050
  var detect = (
2057
- 'Element' in this && 'previousElementSibling' in document.documentElement
2051
+ 'document' in this && "previousElementSibling" in document.documentElement
2058
2052
  );
2059
2053
 
2060
2054
  if (detect) return
2061
2055
 
2062
- (function (global) {
2063
- // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
2064
- // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L35-L40
2065
- Object.defineProperty(Element.prototype, 'previousElementSibling', {
2066
- get: function(){
2067
- var el = this.previousSibling;
2068
- while (el && el.nodeType !== 1) { el = el.previousSibling; }
2069
- return el;
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" role="presentation" focusable="false">
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 errorMessage component (e.g. text).",
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 errorMessage component (e.g. text).",
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
- // Polyfill from https://raw.githubusercontent.com/Financial-Times/polyfill-service/1f3c09b402f65bf6e393f933a15ba63f1b86ef1f/packages/polyfill-library/polyfills/Element/prototype/closest/polyfill.js
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 errorMessage component.",
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
- role="presentation"
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
- role="presentation"
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 errorMessage component.",
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 errorMessage component (e.g. text).",
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 errorMessage component (e.g. text).",
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": true,
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://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-b09a5d2acf3314b46a6c8f8d0c31b85c
749
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/nextElementSibling/detect.js
750
750
  var detect = (
751
- 'Element' in this && "nextElementSibling" in document.documentElement
751
+ 'document' in this && "nextElementSibling" in document.documentElement
752
752
  );
753
753
 
754
754
  if (detect) return
755
755
 
756
-
757
- (function (global) {
758
-
759
- // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
760
- // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L28-L33
761
- Object.defineProperty(Element.prototype, "nextElementSibling", {
762
- get: function(){
763
- var el = this.nextSibling;
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://github.com/Financial-Times/polyfill-service/pull/1062/files#diff-a162235fbc9c0dd40d4032265f44942e
769
+ // Detection from https://raw.githubusercontent.com/Financial-Times/polyfill-library/master/polyfills/Element/prototype/previousElementSibling/detect.js
776
770
  var detect = (
777
- 'Element' in this && 'previousElementSibling' in document.documentElement
771
+ 'document' in this && "previousElementSibling" in document.documentElement
778
772
  );
779
773
 
780
774
  if (detect) return
781
775
 
782
- (function (global) {
783
- // There is no polyfill in polyfill-library (https://github.com/Financial-Times/polyfill-library/issues/338)
784
- // So we source this from https://github.com/Alhadis/Snippets/blob/e09b4dfb7ffc9e250bc28319051e39ead3e5f70a/js/polyfills/IE8-child-elements.js#L35-L40
785
- Object.defineProperty(Element.prototype, 'previousElementSibling', {
786
- get: function(){
787
- var el = this.previousSibling;
788
- while (el && el.nodeType !== 1) { el = el.previousSibling; }
789
- return el;
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
- <section 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 %}>
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
- </section>
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
  }