govuk_publishing_components 34.0.0 → 34.1.0
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/analytics-ga4/ga4-core.js +16 -27
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +2 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +12 -69
- data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +14 -13
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +247 -412
- data/app/views/govuk_publishing_components/components/_label.html.erb +3 -2
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +94 -143
- data/app/views/govuk_publishing_components/components/docs/label.yml +6 -0
- data/config/locales/ar.yml +4 -1
- data/config/locales/az.yml +4 -1
- data/config/locales/be.yml +4 -1
- data/config/locales/bg.yml +4 -1
- data/config/locales/bn.yml +4 -1
- data/config/locales/cs.yml +4 -1
- data/config/locales/cy.yml +4 -1
- data/config/locales/da.yml +4 -1
- data/config/locales/de.yml +4 -1
- data/config/locales/dr.yml +4 -1
- data/config/locales/el.yml +4 -1
- data/config/locales/en.yml +6 -10
- data/config/locales/es-419.yml +4 -1
- data/config/locales/es.yml +4 -1
- data/config/locales/et.yml +4 -1
- data/config/locales/fa.yml +4 -1
- data/config/locales/fi.yml +4 -1
- data/config/locales/fr.yml +4 -1
- data/config/locales/gd.yml +4 -1
- data/config/locales/gu.yml +4 -1
- data/config/locales/he.yml +4 -1
- data/config/locales/hi.yml +4 -1
- data/config/locales/hr.yml +4 -1
- data/config/locales/hu.yml +4 -1
- data/config/locales/hy.yml +4 -1
- data/config/locales/id.yml +4 -1
- data/config/locales/is.yml +4 -1
- data/config/locales/it.yml +4 -1
- data/config/locales/ja.yml +4 -1
- data/config/locales/ka.yml +4 -1
- data/config/locales/kk.yml +4 -1
- data/config/locales/ko.yml +4 -1
- data/config/locales/lt.yml +4 -1
- data/config/locales/lv.yml +4 -1
- data/config/locales/ms.yml +4 -1
- data/config/locales/mt.yml +4 -1
- data/config/locales/nl.yml +4 -1
- data/config/locales/no.yml +4 -1
- data/config/locales/pa-pk.yml +4 -1
- data/config/locales/pa.yml +4 -1
- data/config/locales/pl.yml +4 -1
- data/config/locales/ps.yml +4 -1
- data/config/locales/pt.yml +4 -1
- data/config/locales/ro.yml +4 -1
- data/config/locales/ru.yml +4 -1
- data/config/locales/si.yml +4 -1
- data/config/locales/sk.yml +4 -1
- data/config/locales/sl.yml +4 -1
- data/config/locales/so.yml +4 -1
- data/config/locales/sq.yml +4 -1
- data/config/locales/sr.yml +4 -1
- data/config/locales/sv.yml +4 -1
- data/config/locales/sw.yml +4 -1
- data/config/locales/ta.yml +4 -1
- data/config/locales/th.yml +4 -1
- data/config/locales/tk.yml +4 -1
- data/config/locales/tr.yml +4 -1
- data/config/locales/uk.yml +4 -1
- data/config/locales/ur.yml +4 -1
- data/config/locales/uz.yml +4 -1
- data/config/locales/vi.yml +4 -1
- data/config/locales/zh-hk.yml +4 -1
- data/config/locales/zh-tw.yml +4 -1
- data/config/locales/zh.yml +4 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/axe-core/axe.d.ts +75 -24
- data/node_modules/axe-core/axe.js +4765 -4555
- data/node_modules/axe-core/axe.min.js +2 -2
- data/node_modules/axe-core/package.json +2 -2
- data/node_modules/axe-core/sri-history.json +4 -0
- metadata +2 -2
@@ -45,23 +45,65 @@ declare namespace axe {
|
|
45
45
|
| 'embedded'
|
46
46
|
| 'interactive';
|
47
47
|
|
48
|
+
// Array of length 2 or greater
|
49
|
+
type MultiArray<T> = [T, T, ...T[]];
|
50
|
+
|
51
|
+
// Selectors within a frame
|
48
52
|
type BaseSelector = string;
|
49
|
-
type CrossTreeSelector = BaseSelector | BaseSelector[];
|
50
|
-
type CrossFrameSelector = CrossTreeSelector[];
|
51
53
|
|
52
|
-
type
|
53
|
-
|
54
|
-
|
55
|
-
};
|
54
|
+
type ShadowDomSelector = MultiArray<BaseSelector>;
|
55
|
+
type CrossTreeSelector = BaseSelector | ShadowDomSelector;
|
56
|
+
type LabelledShadowDomSelector = { fromShadowDom: ShadowDomSelector };
|
56
57
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
};
|
58
|
+
// Cross-frame selectors
|
59
|
+
type FramesSelector = Array<CrossTreeSelector | LabelledShadowDomSelector>;
|
60
|
+
type UnlabelledFrameSelector = CrossTreeSelector[];
|
61
|
+
type LabelledFramesSelector = { fromFrames: MultiArray<FramesSelector[0]> };
|
62
|
+
/**
|
63
|
+
* @deprecated Use UnlabelledFrameSelector instead
|
64
|
+
*/
|
65
|
+
type CrossFrameSelector = UnlabelledFrameSelector;
|
66
|
+
|
67
|
+
// Context options
|
68
|
+
type Selector =
|
69
|
+
| Node
|
70
|
+
| BaseSelector
|
71
|
+
| LabelledShadowDomSelector
|
72
|
+
| LabelledFramesSelector;
|
73
|
+
type SelectorList = Array<Selector | FramesSelector> | NodeList;
|
74
|
+
type ContextObject =
|
75
|
+
| {
|
76
|
+
include: Selector | SelectorList;
|
77
|
+
exclude?: Selector | SelectorList;
|
78
|
+
}
|
79
|
+
| {
|
80
|
+
exclude: Selector | SelectorList;
|
81
|
+
};
|
82
|
+
type ElementContext = Selector | SelectorList | ContextObject;
|
61
83
|
|
62
|
-
type
|
84
|
+
type SerialSelector =
|
85
|
+
| BaseSelector
|
86
|
+
| LabelledShadowDomSelector
|
87
|
+
| LabelledFramesSelector;
|
88
|
+
type SerialFrameSelector = SerialSelector | FramesSelector;
|
89
|
+
type SerialSelectorList = Array<SerialFrameSelector>;
|
63
90
|
|
64
|
-
type
|
91
|
+
type SerialContextObject =
|
92
|
+
| {
|
93
|
+
include: SerialSelector | SerialSelectorList;
|
94
|
+
exclude?: SerialSelector | SerialSelectorList;
|
95
|
+
}
|
96
|
+
| {
|
97
|
+
exclude: SerialSelector | SerialSelectorList;
|
98
|
+
include?: SerialSelector | SerialSelectorList;
|
99
|
+
};
|
100
|
+
|
101
|
+
interface FrameContextObject {
|
102
|
+
include: UnlabelledFrameSelector[];
|
103
|
+
exclude: UnlabelledFrameSelector[];
|
104
|
+
}
|
105
|
+
|
106
|
+
type RunCallback<T = AxeResults> = (error: Error, results: T) => void;
|
65
107
|
|
66
108
|
interface TestEngine {
|
67
109
|
name: string;
|
@@ -255,9 +297,9 @@ declare namespace axe {
|
|
255
297
|
interface SerialDqElement {
|
256
298
|
source: string;
|
257
299
|
nodeIndexes: number[];
|
258
|
-
selector:
|
300
|
+
selector: UnlabelledFrameSelector;
|
259
301
|
xpath: string[];
|
260
|
-
ancestry:
|
302
|
+
ancestry: UnlabelledFrameSelector;
|
261
303
|
}
|
262
304
|
interface PartialRuleResult {
|
263
305
|
id: string;
|
@@ -274,7 +316,7 @@ declare namespace axe {
|
|
274
316
|
type PartialResults = Array<PartialResult | null>;
|
275
317
|
interface FrameContext {
|
276
318
|
frameSelector: CrossTreeSelector;
|
277
|
-
frameContext:
|
319
|
+
frameContext: FrameContextObject;
|
278
320
|
}
|
279
321
|
interface Utils {
|
280
322
|
getFrameContexts: (
|
@@ -282,6 +324,7 @@ declare namespace axe {
|
|
282
324
|
options?: RunOptions
|
283
325
|
) => FrameContext[];
|
284
326
|
shadowSelect: (selector: CrossTreeSelector) => Element | null;
|
327
|
+
shadowSelectAll: (selector: CrossTreeSelector) => Element[];
|
285
328
|
}
|
286
329
|
interface EnvironmentData {
|
287
330
|
testEngine: TestEngine;
|
@@ -313,19 +356,27 @@ declare namespace axe {
|
|
313
356
|
* @param {RunCallback} callback Optional The function to invoke when analysis is complete.
|
314
357
|
* @returns {Promise<AxeResults>|void} If the callback was not defined, axe will return a Promise.
|
315
358
|
*/
|
316
|
-
function run(context?: ElementContext): Promise<
|
317
|
-
function run(options: RunOptions): Promise<
|
318
|
-
function run
|
319
|
-
|
320
|
-
|
321
|
-
function run(
|
359
|
+
function run<T = AxeResults>(context?: ElementContext): Promise<T>;
|
360
|
+
function run<T = AxeResults>(options: RunOptions): Promise<T>;
|
361
|
+
function run<T = AxeResults>(
|
362
|
+
callback: (error: Error, results: T) => void
|
363
|
+
): void;
|
364
|
+
function run<T = AxeResults>(
|
365
|
+
context: ElementContext,
|
366
|
+
callback: RunCallback<T>
|
367
|
+
): void;
|
368
|
+
function run<T = AxeResults>(
|
369
|
+
options: RunOptions,
|
370
|
+
callback: RunCallback<T>
|
371
|
+
): void;
|
372
|
+
function run<T = AxeResults>(
|
322
373
|
context: ElementContext,
|
323
374
|
options: RunOptions
|
324
|
-
): Promise<
|
325
|
-
function run(
|
375
|
+
): Promise<T>;
|
376
|
+
function run<T = AxeResults>(
|
326
377
|
context: ElementContext,
|
327
378
|
options: RunOptions,
|
328
|
-
callback: RunCallback
|
379
|
+
callback: RunCallback<T>
|
329
380
|
): void;
|
330
381
|
|
331
382
|
/**
|