govuk_publishing_components 34.0.0 → 34.1.1
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/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +2 -2
- data/app/controllers/govuk_publishing_components/audit_controller.rb +1 -1
- data/app/models/govuk_publishing_components/audit_comparer.rb +1 -1
- data/app/models/govuk_publishing_components/audit_components.rb +103 -82
- data/app/views/govuk_publishing_components/audit/_applications.html.erb +1 -1
- data/app/views/govuk_publishing_components/audit/_component_contents.html.erb +47 -39
- data/app/views/govuk_publishing_components/audit/_components.html.erb +1 -1
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +2 -2
- 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 +76 -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 +8 -0
- metadata +2 -2
data/config/locales/id.yml
CHANGED
data/config/locales/is.yml
CHANGED
data/config/locales/it.yml
CHANGED
data/config/locales/ja.yml
CHANGED
data/config/locales/ka.yml
CHANGED
data/config/locales/kk.yml
CHANGED
data/config/locales/ko.yml
CHANGED
data/config/locales/lt.yml
CHANGED
data/config/locales/lv.yml
CHANGED
data/config/locales/ms.yml
CHANGED
data/config/locales/mt.yml
CHANGED
data/config/locales/nl.yml
CHANGED
data/config/locales/no.yml
CHANGED
data/config/locales/pa-pk.yml
CHANGED
data/config/locales/pa.yml
CHANGED
data/config/locales/pl.yml
CHANGED
data/config/locales/ps.yml
CHANGED
data/config/locales/pt.yml
CHANGED
data/config/locales/ro.yml
CHANGED
data/config/locales/ru.yml
CHANGED
data/config/locales/si.yml
CHANGED
data/config/locales/sk.yml
CHANGED
data/config/locales/sl.yml
CHANGED
data/config/locales/so.yml
CHANGED
data/config/locales/sq.yml
CHANGED
data/config/locales/sr.yml
CHANGED
data/config/locales/sv.yml
CHANGED
data/config/locales/sw.yml
CHANGED
data/config/locales/ta.yml
CHANGED
data/config/locales/th.yml
CHANGED
data/config/locales/tk.yml
CHANGED
data/config/locales/tr.yml
CHANGED
data/config/locales/uk.yml
CHANGED
data/config/locales/ur.yml
CHANGED
data/config/locales/uz.yml
CHANGED
data/config/locales/vi.yml
CHANGED
data/config/locales/zh-hk.yml
CHANGED
data/config/locales/zh-tw.yml
CHANGED
data/config/locales/zh.yml
CHANGED
@@ -45,23 +45,66 @@ 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
|
+
include?: Selector | SelectorList;
|
82
|
+
};
|
83
|
+
type ElementContext = Selector | SelectorList | ContextObject;
|
61
84
|
|
62
|
-
type
|
85
|
+
type SerialSelector =
|
86
|
+
| BaseSelector
|
87
|
+
| LabelledShadowDomSelector
|
88
|
+
| LabelledFramesSelector;
|
89
|
+
type SerialFrameSelector = SerialSelector | FramesSelector;
|
90
|
+
type SerialSelectorList = Array<SerialFrameSelector>;
|
63
91
|
|
64
|
-
type
|
92
|
+
type SerialContextObject =
|
93
|
+
| {
|
94
|
+
include: SerialSelector | SerialSelectorList;
|
95
|
+
exclude?: SerialSelector | SerialSelectorList;
|
96
|
+
}
|
97
|
+
| {
|
98
|
+
exclude: SerialSelector | SerialSelectorList;
|
99
|
+
include?: SerialSelector | SerialSelectorList;
|
100
|
+
};
|
101
|
+
|
102
|
+
interface FrameContextObject {
|
103
|
+
include: UnlabelledFrameSelector[];
|
104
|
+
exclude: UnlabelledFrameSelector[];
|
105
|
+
}
|
106
|
+
|
107
|
+
type RunCallback<T = AxeResults> = (error: Error, results: T) => void;
|
65
108
|
|
66
109
|
interface TestEngine {
|
67
110
|
name: string;
|
@@ -255,9 +298,9 @@ declare namespace axe {
|
|
255
298
|
interface SerialDqElement {
|
256
299
|
source: string;
|
257
300
|
nodeIndexes: number[];
|
258
|
-
selector:
|
301
|
+
selector: UnlabelledFrameSelector;
|
259
302
|
xpath: string[];
|
260
|
-
ancestry:
|
303
|
+
ancestry: UnlabelledFrameSelector;
|
261
304
|
}
|
262
305
|
interface PartialRuleResult {
|
263
306
|
id: string;
|
@@ -274,7 +317,7 @@ declare namespace axe {
|
|
274
317
|
type PartialResults = Array<PartialResult | null>;
|
275
318
|
interface FrameContext {
|
276
319
|
frameSelector: CrossTreeSelector;
|
277
|
-
frameContext:
|
320
|
+
frameContext: FrameContextObject;
|
278
321
|
}
|
279
322
|
interface Utils {
|
280
323
|
getFrameContexts: (
|
@@ -282,6 +325,7 @@ declare namespace axe {
|
|
282
325
|
options?: RunOptions
|
283
326
|
) => FrameContext[];
|
284
327
|
shadowSelect: (selector: CrossTreeSelector) => Element | null;
|
328
|
+
shadowSelectAll: (selector: CrossTreeSelector) => Element[];
|
285
329
|
}
|
286
330
|
interface EnvironmentData {
|
287
331
|
testEngine: TestEngine;
|
@@ -313,19 +357,27 @@ declare namespace axe {
|
|
313
357
|
* @param {RunCallback} callback Optional The function to invoke when analysis is complete.
|
314
358
|
* @returns {Promise<AxeResults>|void} If the callback was not defined, axe will return a Promise.
|
315
359
|
*/
|
316
|
-
function run(context?: ElementContext): Promise<
|
317
|
-
function run(options: RunOptions): Promise<
|
318
|
-
function run
|
319
|
-
|
320
|
-
|
321
|
-
function run(
|
360
|
+
function run<T = AxeResults>(context?: ElementContext): Promise<T>;
|
361
|
+
function run<T = AxeResults>(options: RunOptions): Promise<T>;
|
362
|
+
function run<T = AxeResults>(
|
363
|
+
callback: (error: Error, results: T) => void
|
364
|
+
): void;
|
365
|
+
function run<T = AxeResults>(
|
366
|
+
context: ElementContext,
|
367
|
+
callback: RunCallback<T>
|
368
|
+
): void;
|
369
|
+
function run<T = AxeResults>(
|
370
|
+
options: RunOptions,
|
371
|
+
callback: RunCallback<T>
|
372
|
+
): void;
|
373
|
+
function run<T = AxeResults>(
|
322
374
|
context: ElementContext,
|
323
375
|
options: RunOptions
|
324
|
-
): Promise<
|
325
|
-
function run(
|
376
|
+
): Promise<T>;
|
377
|
+
function run<T = AxeResults>(
|
326
378
|
context: ElementContext,
|
327
379
|
options: RunOptions,
|
328
|
-
callback: RunCallback
|
380
|
+
callback: RunCallback<T>
|
329
381
|
): void;
|
330
382
|
|
331
383
|
/**
|