govuk_publishing_components 21.22.0 → 21.22.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +2 -1
  3. data/app/views/govuk_publishing_components/components/_character_count.html.erb +14 -13
  4. data/app/views/govuk_publishing_components/components/docs/character_count.yml +8 -0
  5. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +17 -4
  6. data/lib/govuk_publishing_components/version.rb +1 -1
  7. data/node_modules/axe-core/CHANGELOG.md +37 -0
  8. data/node_modules/axe-core/README.md +2 -2
  9. data/node_modules/axe-core/axe.d.ts +1 -1
  10. data/node_modules/axe-core/axe.js +2430 -2242
  11. data/node_modules/axe-core/axe.min.js +3 -3
  12. data/node_modules/axe-core/bower.json +1 -1
  13. data/node_modules/axe-core/doc/API.md +10 -0
  14. data/node_modules/axe-core/doc/check-message-template.md +124 -0
  15. data/node_modules/axe-core/doc/examples/jasmine/package-lock.json +1489 -0
  16. data/node_modules/axe-core/doc/examples/jest_react/package-lock.json +7525 -0
  17. data/node_modules/axe-core/doc/examples/mocha/package-lock.json +1671 -0
  18. data/node_modules/axe-core/doc/examples/phantomjs/package-lock.json +862 -0
  19. data/node_modules/axe-core/doc/examples/qunit/package-lock.json +2951 -0
  20. data/node_modules/axe-core/doc/rule-descriptions.md +2 -2
  21. data/node_modules/axe-core/lib/checks/aria/allowed-attr.json +4 -1
  22. data/node_modules/axe-core/lib/checks/aria/aria-allowed-role.json +8 -2
  23. data/node_modules/axe-core/lib/checks/aria/errormessage.json +4 -1
  24. data/node_modules/axe-core/lib/checks/aria/implicit-role-fallback.json +1 -0
  25. data/node_modules/axe-core/lib/checks/aria/no-implicit-explicit-label.json +1 -1
  26. data/node_modules/axe-core/lib/checks/aria/required-attr.json +4 -1
  27. data/node_modules/axe-core/lib/checks/aria/required-children.json +8 -2
  28. data/node_modules/axe-core/lib/checks/aria/required-parent.json +4 -1
  29. data/node_modules/axe-core/lib/checks/aria/unsupportedattr.json +1 -1
  30. data/node_modules/axe-core/lib/checks/aria/unsupportedrole.json +1 -1
  31. data/node_modules/axe-core/lib/checks/aria/valid-attr-value.json +8 -2
  32. data/node_modules/axe-core/lib/checks/aria/valid-attr.json +5 -2
  33. data/node_modules/axe-core/lib/checks/color/color-contrast.js +1 -1
  34. data/node_modules/axe-core/lib/checks/color/color-contrast.json +4 -4
  35. data/node_modules/axe-core/lib/checks/color/link-in-text-block.js +2 -2
  36. data/node_modules/axe-core/lib/checks/color/link-in-text-block.json +2 -2
  37. data/node_modules/axe-core/lib/checks/forms/fieldset.js +1 -1
  38. data/node_modules/axe-core/lib/checks/forms/fieldset.json +8 -1
  39. data/node_modules/axe-core/lib/checks/forms/group-labelledby.js +2 -2
  40. data/node_modules/axe-core/lib/checks/forms/group-labelledby.json +6 -2
  41. data/node_modules/axe-core/lib/checks/keyboard/landmark-is-top-level.json +2 -2
  42. data/node_modules/axe-core/lib/checks/lists/listitem.js +3 -1
  43. data/node_modules/axe-core/lib/checks/lists/listitem.json +4 -1
  44. data/node_modules/axe-core/lib/checks/mobile/css-orientation-lock.js +216 -99
  45. data/node_modules/axe-core/lib/checks/mobile/css-orientation-lock.json +3 -0
  46. data/node_modules/axe-core/lib/checks/mobile/meta-viewport.json +1 -1
  47. data/node_modules/axe-core/lib/checks/parsing/duplicate-id-active.json +1 -1
  48. data/node_modules/axe-core/lib/checks/parsing/duplicate-id-aria.json +1 -1
  49. data/node_modules/axe-core/lib/checks/shared/aria-label.js +1 -1
  50. data/node_modules/axe-core/lib/checks/shared/avoid-inline-spacing.json +4 -1
  51. data/node_modules/axe-core/lib/checks/shared/non-empty-if-present.js +5 -1
  52. data/node_modules/axe-core/lib/checks/shared/non-empty-if-present.json +4 -1
  53. data/node_modules/axe-core/lib/checks/tables/has-caption.json +1 -0
  54. data/node_modules/axe-core/lib/checks/tables/has-summary.json +1 -0
  55. data/node_modules/axe-core/lib/checks/tables/has-th.json +1 -0
  56. data/node_modules/axe-core/lib/commons/aria/arialabel-text.js +7 -4
  57. data/node_modules/axe-core/lib/commons/aria/get-element-unallowed-roles.js +21 -0
  58. data/node_modules/axe-core/lib/commons/dom/get-element-stack.js +465 -0
  59. data/node_modules/axe-core/lib/commons/dom/shadow-elements-from-point.js +2 -1
  60. data/node_modules/axe-core/lib/core/base/audit.js +39 -17
  61. data/node_modules/axe-core/lib/core/base/virtual-node/serial-virtual-node.js +2 -0
  62. data/node_modules/axe-core/lib/core/base/virtual-node/virtual-node.js +43 -0
  63. data/node_modules/axe-core/lib/core/reporters/helpers/incomplete-fallback-msg.js +3 -1
  64. data/node_modules/axe-core/lib/core/utils/parse-crossorigin-stylesheet.js +1 -0
  65. data/node_modules/axe-core/lib/core/utils/preload-cssom.js +4 -3
  66. data/node_modules/axe-core/lib/core/utils/process-message.js +72 -0
  67. data/node_modules/axe-core/lib/core/utils/publish-metadata.js +20 -7
  68. data/node_modules/axe-core/lib/rules/aria-dpub-role-fallback.json +2 -1
  69. data/node_modules/axe-core/lib/rules/label-content-name-mismatch-matches.js +1 -1
  70. data/node_modules/axe-core/lib/rules/layout-table.json +2 -1
  71. data/node_modules/axe-core/locales/ja.json +1 -1
  72. data/node_modules/axe-core/package.json +16 -16
  73. data/node_modules/axe-core/sri-history.json +4 -0
  74. data/node_modules/axe-core/typings/axe-core/axe-core-tests.js +151 -0
  75. data/node_modules/axe-core/typings/axe-core/axe-core-tests.ts +18 -0
  76. metadata +11 -2
@@ -154,5 +154,9 @@
154
154
  "3.4.1": {
155
155
  "axe.js": "sha256-ntH0PXGhEgawLqZDxK7G8qwBX4dNE8UtgAZ1ByVNsNw=",
156
156
  "axe.min.js": "sha256-n4jjgXRRjftBTkYeLoo17xr9nJdyz8Q32MJfwZSlY7w="
157
+ },
158
+ "3.4.2": {
159
+ "axe.js": "sha256-1O2tV4TBC/8pYjxbIwj192fUX1SJvsjn8KQH3PdJUuU=",
160
+ "axe.min.js": "sha256-XXgQWSZNsMKcqEQnEU2BDkIfCzV6gCjOjrwnrzioYm4="
157
161
  }
158
162
  }
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ var axe = require("../../axe");
4
+ var context = document;
5
+ var $fixture = {};
6
+ axe.run(context, {}, function (error, results) {
7
+ if (error) {
8
+ console.log(error);
9
+ }
10
+ console.log(results.passes.length);
11
+ console.log(results.incomplete.length);
12
+ console.log(results.inapplicable.length);
13
+ console.log(results.violations.length);
14
+ console.log(results.violations[0].nodes[0].failureSummary);
15
+ });
16
+ axe.run().then(function (done) {
17
+ done();
18
+ });
19
+ // additional configuration options
20
+ axe.run(context, { iframes: false, selectors: false, elementRef: false }, function (error, results) {
21
+ console.log(error || results.passes.length);
22
+ });
23
+ // axe.run include/exclude
24
+ axe.run({ include: [['#id1'], ['#id2']] }, {}, function (error, results) {
25
+ console.log(error || results);
26
+ });
27
+ axe.run({ exclude: [$fixture[0]] }, {}, function (error, results) {
28
+ console.log(error || results);
29
+ });
30
+ // additional configuration options
31
+ axe.run(context, { iframes: false, selectors: false, elementRef: false }, function (error, results) {
32
+ console.log(error || results.passes.length);
33
+ });
34
+ var tagConfigRunOnly = {
35
+ type: 'tag',
36
+ values: ['wcag2a']
37
+ };
38
+ var tagConfig = {
39
+ runOnly: tagConfigRunOnly
40
+ };
41
+ axe.run(context, tagConfig, function (error, results) {
42
+ console.log(error || results);
43
+ });
44
+ axe.run(context, {
45
+ runOnly: {
46
+ type: 'tags',
47
+ values: ['wcag2a', 'wcag2aa']
48
+ }
49
+ }, function (error, results) {
50
+ console.log(error || results);
51
+ });
52
+ axe.run(context, {
53
+ runOnly: ['wcag2a', 'wcag2aa']
54
+ }, function (error, results) {
55
+ console.log(error || results);
56
+ });
57
+ axe.run(context, {
58
+ runOnly: ['color-contrast', 'heading-order']
59
+ }, function (error, results) {
60
+ console.log(error || results);
61
+ });
62
+ var someRulesConfig = {
63
+ rules: {
64
+ 'color-contrast': { enabled: 'false' },
65
+ 'heading-order': { enabled: 'true' }
66
+ }
67
+ };
68
+ axe.run(context, someRulesConfig, function (error, results) {
69
+ console.log(error || results);
70
+ });
71
+ // axe.configure
72
+ var spec = {
73
+ branding: {
74
+ brand: 'foo',
75
+ application: 'bar'
76
+ },
77
+ reporter: 'v1',
78
+ checks: [
79
+ {
80
+ id: 'custom-check',
81
+ evaluate: function () {
82
+ return true;
83
+ }
84
+ }
85
+ ],
86
+ rules: [
87
+ {
88
+ id: 'custom-rule',
89
+ any: ['custom-check']
90
+ }
91
+ ]
92
+ };
93
+ axe.configure(spec);
94
+ var source = axe.source;
95
+ axe.reset();
96
+ axe.getRules(['wcag2aa']);
97
+ typeof axe.getRules() === 'object';
98
+ var rules = axe.getRules();
99
+ rules.forEach(function (rule) {
100
+ rule.ruleId.substr(1234);
101
+ });
102
+ // Plugins
103
+ var pluginSrc = {
104
+ id: 'doStuff',
105
+ run: function (data, callback) {
106
+ callback();
107
+ },
108
+ commands: [
109
+ {
110
+ id: 'run-doStuff',
111
+ callback: function (data, callback) {
112
+ axe.plugins['doStuff'].run(data, callback);
113
+ }
114
+ }
115
+ ]
116
+ };
117
+ axe.registerPlugin(pluginSrc);
118
+ axe.cleanup();
119
+ axe.configure({
120
+ locale: {
121
+ checks: {
122
+ foo: {
123
+ fail: 'failure',
124
+ pass: 'success',
125
+ incomplete: {
126
+ foo: 'nar'
127
+ }
128
+ }
129
+ }
130
+ }
131
+ });
132
+ axe.configure({
133
+ locale: {
134
+ lang: 'foo',
135
+ rules: {
136
+ foo: {
137
+ description: 'desc',
138
+ help: 'help'
139
+ }
140
+ },
141
+ checks: {
142
+ foo: {
143
+ pass: 'pass',
144
+ fail: 'fail',
145
+ incomplete: {
146
+ foo: 'bar'
147
+ }
148
+ }
149
+ }
150
+ }
151
+ });
@@ -69,6 +69,24 @@ axe.run(
69
69
  console.log(error || results);
70
70
  }
71
71
  );
72
+ axe.run(
73
+ context,
74
+ {
75
+ runOnly: ['wcag2a', 'wcag2aa']
76
+ },
77
+ (error: Error, results: axe.AxeResults) => {
78
+ console.log(error || results);
79
+ }
80
+ );
81
+ axe.run(
82
+ context,
83
+ {
84
+ runOnly: ['color-contrast', 'heading-order']
85
+ },
86
+ (error: Error, results: axe.AxeResults) => {
87
+ console.log(error || results);
88
+ }
89
+ );
72
90
 
73
91
  var someRulesConfig = {
74
92
  rules: {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.22.0
4
+ version: 21.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-03 00:00:00.000000000 Z
11
+ date: 2020-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters
@@ -782,6 +782,7 @@ files:
782
782
  - node_modules/axe-core/doc/act-rules-format.md
783
783
  - node_modules/axe-core/doc/aria-supported.md
784
784
  - node_modules/axe-core/doc/backwards-compatibility-doc.md
785
+ - node_modules/axe-core/doc/check-message-template.md
785
786
  - node_modules/axe-core/doc/code-submission-guidelines.md
786
787
  - node_modules/axe-core/doc/developer-guide.md
787
788
  - node_modules/axe-core/doc/examples/chrome-debugging-protocol/README.md
@@ -790,24 +791,29 @@ files:
790
791
  - node_modules/axe-core/doc/examples/html-handlebars.md
791
792
  - node_modules/axe-core/doc/examples/jasmine/README.md
792
793
  - node_modules/axe-core/doc/examples/jasmine/karma.conf.js
794
+ - node_modules/axe-core/doc/examples/jasmine/package-lock.json
793
795
  - node_modules/axe-core/doc/examples/jasmine/package.json
794
796
  - node_modules/axe-core/doc/examples/jasmine/spec/a11y.js
795
797
  - node_modules/axe-core/doc/examples/jest_react/README.md
796
798
  - node_modules/axe-core/doc/examples/jest_react/link.js
797
799
  - node_modules/axe-core/doc/examples/jest_react/link.test.js
800
+ - node_modules/axe-core/doc/examples/jest_react/package-lock.json
798
801
  - node_modules/axe-core/doc/examples/jest_react/package.json
799
802
  - node_modules/axe-core/doc/examples/jest_react/test-helpers.js
800
803
  - node_modules/axe-core/doc/examples/jsdom/package.json
801
804
  - node_modules/axe-core/doc/examples/mocha/README.md
802
805
  - node_modules/axe-core/doc/examples/mocha/karma.conf.js
806
+ - node_modules/axe-core/doc/examples/mocha/package-lock.json
803
807
  - node_modules/axe-core/doc/examples/mocha/package.json
804
808
  - node_modules/axe-core/doc/examples/phantomjs/README.md
805
809
  - node_modules/axe-core/doc/examples/phantomjs/axe-phantom.js
810
+ - node_modules/axe-core/doc/examples/phantomjs/package-lock.json
806
811
  - node_modules/axe-core/doc/examples/phantomjs/package.json
807
812
  - node_modules/axe-core/doc/examples/puppeteer/README.md
808
813
  - node_modules/axe-core/doc/examples/puppeteer/axe-puppeteer.js
809
814
  - node_modules/axe-core/doc/examples/puppeteer/package.json
810
815
  - node_modules/axe-core/doc/examples/qunit/README.md
816
+ - node_modules/axe-core/doc/examples/qunit/package-lock.json
811
817
  - node_modules/axe-core/doc/examples/qunit/package.json
812
818
  - node_modules/axe-core/doc/examples/test-examples.js
813
819
  - node_modules/axe-core/doc/plugins.md
@@ -1047,6 +1053,7 @@ files:
1047
1053
  - node_modules/axe-core/lib/commons/dom/get-composed-parent.js
1048
1054
  - node_modules/axe-core/lib/commons/dom/get-element-by-reference.js
1049
1055
  - node_modules/axe-core/lib/commons/dom/get-element-coordinates.js
1056
+ - node_modules/axe-core/lib/commons/dom/get-element-stack.js
1050
1057
  - node_modules/axe-core/lib/commons/dom/get-root-node.js
1051
1058
  - node_modules/axe-core/lib/commons/dom/get-scroll-offset.js
1052
1059
  - node_modules/axe-core/lib/commons/dom/get-tabbable-elements.js
@@ -1194,6 +1201,7 @@ files:
1194
1201
  - node_modules/axe-core/lib/core/utils/pollyfills.js
1195
1202
  - node_modules/axe-core/lib/core/utils/preload-cssom.js
1196
1203
  - node_modules/axe-core/lib/core/utils/preload.js
1204
+ - node_modules/axe-core/lib/core/utils/process-message.js
1197
1205
  - node_modules/axe-core/lib/core/utils/publish-metadata.js
1198
1206
  - node_modules/axe-core/lib/core/utils/qsa.js
1199
1207
  - node_modules/axe-core/lib/core/utils/queue.js
@@ -1335,6 +1343,7 @@ files:
1335
1343
  - node_modules/axe-core/locales/pt_BR.json
1336
1344
  - node_modules/axe-core/package.json
1337
1345
  - node_modules/axe-core/sri-history.json
1346
+ - node_modules/axe-core/typings/axe-core/axe-core-tests.js
1338
1347
  - node_modules/axe-core/typings/axe-core/axe-core-tests.ts
1339
1348
  - node_modules/govuk-frontend/README.md
1340
1349
  - node_modules/govuk-frontend/govuk-prototype-kit.config.json