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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +16 -27
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-event-tracker.js +2 -0
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +4 -4
  5. data/app/assets/javascripts/govuk_publishing_components/components/layout-super-navigation-header.js +12 -69
  6. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +14 -13
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +247 -412
  8. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +2 -2
  9. data/app/controllers/govuk_publishing_components/audit_controller.rb +1 -1
  10. data/app/models/govuk_publishing_components/audit_comparer.rb +1 -1
  11. data/app/models/govuk_publishing_components/audit_components.rb +103 -82
  12. data/app/views/govuk_publishing_components/audit/_applications.html.erb +1 -1
  13. data/app/views/govuk_publishing_components/audit/_component_contents.html.erb +47 -39
  14. data/app/views/govuk_publishing_components/audit/_components.html.erb +1 -1
  15. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +2 -2
  16. data/app/views/govuk_publishing_components/components/_label.html.erb +3 -2
  17. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +94 -143
  18. data/app/views/govuk_publishing_components/components/docs/label.yml +6 -0
  19. data/config/locales/ar.yml +4 -1
  20. data/config/locales/az.yml +4 -1
  21. data/config/locales/be.yml +4 -1
  22. data/config/locales/bg.yml +4 -1
  23. data/config/locales/bn.yml +4 -1
  24. data/config/locales/cs.yml +4 -1
  25. data/config/locales/cy.yml +4 -1
  26. data/config/locales/da.yml +4 -1
  27. data/config/locales/de.yml +4 -1
  28. data/config/locales/dr.yml +4 -1
  29. data/config/locales/el.yml +4 -1
  30. data/config/locales/en.yml +6 -10
  31. data/config/locales/es-419.yml +4 -1
  32. data/config/locales/es.yml +4 -1
  33. data/config/locales/et.yml +4 -1
  34. data/config/locales/fa.yml +4 -1
  35. data/config/locales/fi.yml +4 -1
  36. data/config/locales/fr.yml +4 -1
  37. data/config/locales/gd.yml +4 -1
  38. data/config/locales/gu.yml +4 -1
  39. data/config/locales/he.yml +4 -1
  40. data/config/locales/hi.yml +4 -1
  41. data/config/locales/hr.yml +4 -1
  42. data/config/locales/hu.yml +4 -1
  43. data/config/locales/hy.yml +4 -1
  44. data/config/locales/id.yml +4 -1
  45. data/config/locales/is.yml +4 -1
  46. data/config/locales/it.yml +4 -1
  47. data/config/locales/ja.yml +4 -1
  48. data/config/locales/ka.yml +4 -1
  49. data/config/locales/kk.yml +4 -1
  50. data/config/locales/ko.yml +4 -1
  51. data/config/locales/lt.yml +4 -1
  52. data/config/locales/lv.yml +4 -1
  53. data/config/locales/ms.yml +4 -1
  54. data/config/locales/mt.yml +4 -1
  55. data/config/locales/nl.yml +4 -1
  56. data/config/locales/no.yml +4 -1
  57. data/config/locales/pa-pk.yml +4 -1
  58. data/config/locales/pa.yml +4 -1
  59. data/config/locales/pl.yml +4 -1
  60. data/config/locales/ps.yml +4 -1
  61. data/config/locales/pt.yml +4 -1
  62. data/config/locales/ro.yml +4 -1
  63. data/config/locales/ru.yml +4 -1
  64. data/config/locales/si.yml +4 -1
  65. data/config/locales/sk.yml +4 -1
  66. data/config/locales/sl.yml +4 -1
  67. data/config/locales/so.yml +4 -1
  68. data/config/locales/sq.yml +4 -1
  69. data/config/locales/sr.yml +4 -1
  70. data/config/locales/sv.yml +4 -1
  71. data/config/locales/sw.yml +4 -1
  72. data/config/locales/ta.yml +4 -1
  73. data/config/locales/th.yml +4 -1
  74. data/config/locales/tk.yml +4 -1
  75. data/config/locales/tr.yml +4 -1
  76. data/config/locales/uk.yml +4 -1
  77. data/config/locales/ur.yml +4 -1
  78. data/config/locales/uz.yml +4 -1
  79. data/config/locales/vi.yml +4 -1
  80. data/config/locales/zh-hk.yml +4 -1
  81. data/config/locales/zh-tw.yml +4 -1
  82. data/config/locales/zh.yml +4 -1
  83. data/lib/govuk_publishing_components/version.rb +1 -1
  84. data/node_modules/axe-core/axe.d.ts +76 -24
  85. data/node_modules/axe-core/axe.js +4765 -4555
  86. data/node_modules/axe-core/axe.min.js +2 -2
  87. data/node_modules/axe-core/package.json +2 -2
  88. data/node_modules/axe-core/sri-history.json +8 -0
  89. metadata +2 -2
@@ -109,7 +109,10 @@ id:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -109,7 +109,10 @@ is:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -109,7 +109,10 @@ it:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -105,7 +105,10 @@ ja:
105
105
  menu_toggle_label:
106
106
  hide:
107
107
  show:
108
- navigation_links:
108
+ navigation_link:
109
+ href:
110
+ label:
111
+ navigation_links_columns:
109
112
  navigation_menu_heading:
110
113
  navigation_search_heading:
111
114
  navigation_search_subheading:
@@ -112,7 +112,10 @@ ka:
112
112
  menu_toggle_label:
113
113
  hide:
114
114
  show:
115
- navigation_links:
115
+ navigation_link:
116
+ href:
117
+ label:
118
+ navigation_links_columns:
116
119
  navigation_menu_heading:
117
120
  navigation_search_heading:
118
121
  navigation_search_subheading:
@@ -109,7 +109,10 @@ kk:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -104,7 +104,10 @@ ko:
104
104
  menu_toggle_label:
105
105
  hide:
106
106
  show:
107
- navigation_links:
107
+ navigation_link:
108
+ href:
109
+ label:
110
+ navigation_links_columns:
108
111
  navigation_menu_heading:
109
112
  navigation_search_heading:
110
113
  navigation_search_subheading:
@@ -114,7 +114,10 @@ lt:
114
114
  menu_toggle_label:
115
115
  hide:
116
116
  show:
117
- navigation_links:
117
+ navigation_link:
118
+ href:
119
+ label:
120
+ navigation_links_columns:
118
121
  navigation_menu_heading:
119
122
  navigation_search_heading:
120
123
  navigation_search_subheading:
@@ -113,7 +113,10 @@ lv:
113
113
  menu_toggle_label:
114
114
  hide:
115
115
  show:
116
- navigation_links:
116
+ navigation_link:
117
+ href:
118
+ label:
119
+ navigation_links_columns:
117
120
  navigation_menu_heading:
118
121
  navigation_search_heading:
119
122
  navigation_search_subheading:
@@ -108,7 +108,10 @@ ms:
108
108
  menu_toggle_label:
109
109
  hide:
110
110
  show:
111
- navigation_links:
111
+ navigation_link:
112
+ href:
113
+ label:
114
+ navigation_links_columns:
112
115
  navigation_menu_heading:
113
116
  navigation_search_heading:
114
117
  navigation_search_subheading:
@@ -111,7 +111,10 @@ mt:
111
111
  menu_toggle_label:
112
112
  hide:
113
113
  show:
114
- navigation_links:
114
+ navigation_link:
115
+ href:
116
+ label:
117
+ navigation_links_columns:
115
118
  navigation_menu_heading:
116
119
  navigation_search_heading:
117
120
  navigation_search_subheading:
@@ -109,7 +109,10 @@ nl:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -109,7 +109,10 @@
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -105,7 +105,10 @@ pa-pk:
105
105
  menu_toggle_label:
106
106
  hide:
107
107
  show:
108
- navigation_links:
108
+ navigation_link:
109
+ href:
110
+ label:
111
+ navigation_links_columns:
109
112
  navigation_menu_heading:
110
113
  navigation_search_heading:
111
114
  navigation_search_subheading:
@@ -109,7 +109,10 @@ pa:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -113,7 +113,10 @@ pl:
113
113
  menu_toggle_label:
114
114
  hide:
115
115
  show:
116
- navigation_links:
116
+ navigation_link:
117
+ href:
118
+ label:
119
+ navigation_links_columns:
117
120
  navigation_menu_heading:
118
121
  navigation_search_heading:
119
122
  navigation_search_subheading:
@@ -106,7 +106,10 @@ ps:
106
106
  menu_toggle_label:
107
107
  hide:
108
108
  show:
109
- navigation_links:
109
+ navigation_link:
110
+ href:
111
+ label:
112
+ navigation_links_columns:
110
113
  navigation_menu_heading:
111
114
  navigation_search_heading:
112
115
  navigation_search_subheading:
@@ -109,7 +109,10 @@ pt:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -110,7 +110,10 @@ ro:
110
110
  menu_toggle_label:
111
111
  hide:
112
112
  show:
113
- navigation_links:
113
+ navigation_link:
114
+ href:
115
+ label:
116
+ navigation_links_columns:
114
117
  navigation_menu_heading:
115
118
  navigation_search_heading:
116
119
  navigation_search_subheading:
@@ -113,7 +113,10 @@ ru:
113
113
  menu_toggle_label:
114
114
  hide:
115
115
  show:
116
- navigation_links:
116
+ navigation_link:
117
+ href:
118
+ label:
119
+ navigation_links_columns:
117
120
  navigation_menu_heading:
118
121
  navigation_search_heading:
119
122
  navigation_search_subheading:
@@ -109,7 +109,10 @@ si:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -114,7 +114,10 @@ sk:
114
114
  menu_toggle_label:
115
115
  hide:
116
116
  show:
117
- navigation_links:
117
+ navigation_link:
118
+ href:
119
+ label:
120
+ navigation_links_columns:
118
121
  navigation_menu_heading:
119
122
  navigation_search_heading:
120
123
  navigation_search_subheading:
@@ -116,7 +116,10 @@ sl:
116
116
  menu_toggle_label:
117
117
  hide:
118
118
  show:
119
- navigation_links:
119
+ navigation_link:
120
+ href:
121
+ label:
122
+ navigation_links_columns:
120
123
  navigation_menu_heading:
121
124
  navigation_search_heading:
122
125
  navigation_search_subheading:
@@ -109,7 +109,10 @@ so:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -109,7 +109,10 @@ sq:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -110,7 +110,10 @@ sr:
110
110
  menu_toggle_label:
111
111
  hide:
112
112
  show:
113
- navigation_links:
113
+ navigation_link:
114
+ href:
115
+ label:
116
+ navigation_links_columns:
114
117
  navigation_menu_heading:
115
118
  navigation_search_heading:
116
119
  navigation_search_subheading:
@@ -109,7 +109,10 @@ sv:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -109,7 +109,10 @@ sw:
109
109
  menu_toggle_label:
110
110
  hide:
111
111
  show:
112
- navigation_links:
112
+ navigation_link:
113
+ href:
114
+ label:
115
+ navigation_links_columns:
113
116
  navigation_menu_heading:
114
117
  navigation_search_heading:
115
118
  navigation_search_subheading:
@@ -110,7 +110,10 @@ ta:
110
110
  menu_toggle_label:
111
111
  hide:
112
112
  show:
113
- navigation_links:
113
+ navigation_link:
114
+ href:
115
+ label:
116
+ navigation_links_columns:
114
117
  navigation_menu_heading:
115
118
  navigation_search_heading:
116
119
  navigation_search_subheading:
@@ -107,7 +107,10 @@ th:
107
107
  menu_toggle_label:
108
108
  hide:
109
109
  show:
110
- navigation_links:
110
+ navigation_link:
111
+ href:
112
+ label:
113
+ navigation_links_columns:
111
114
  navigation_menu_heading:
112
115
  navigation_search_heading:
113
116
  navigation_search_subheading:
@@ -110,7 +110,10 @@ tk:
110
110
  menu_toggle_label:
111
111
  hide:
112
112
  show:
113
- navigation_links:
113
+ navigation_link:
114
+ href:
115
+ label:
116
+ navigation_links_columns:
114
117
  navigation_menu_heading:
115
118
  navigation_search_heading:
116
119
  navigation_search_subheading:
@@ -110,7 +110,10 @@ tr:
110
110
  menu_toggle_label:
111
111
  hide:
112
112
  show:
113
- navigation_links:
113
+ navigation_link:
114
+ href:
115
+ label:
116
+ navigation_links_columns:
114
117
  navigation_menu_heading:
115
118
  navigation_search_heading:
116
119
  navigation_search_subheading:
@@ -116,7 +116,10 @@ uk:
116
116
  menu_toggle_label:
117
117
  hide:
118
118
  show:
119
- navigation_links:
119
+ navigation_link:
120
+ href:
121
+ label:
122
+ navigation_links_columns:
120
123
  navigation_menu_heading:
121
124
  navigation_search_heading:
122
125
  navigation_search_subheading:
@@ -106,7 +106,10 @@ ur:
106
106
  menu_toggle_label:
107
107
  hide:
108
108
  show:
109
- navigation_links:
109
+ navigation_link:
110
+ href:
111
+ label:
112
+ navigation_links_columns:
110
113
  navigation_menu_heading:
111
114
  navigation_search_heading:
112
115
  navigation_search_subheading:
@@ -111,7 +111,10 @@ uz:
111
111
  menu_toggle_label:
112
112
  hide:
113
113
  show:
114
- navigation_links:
114
+ navigation_link:
115
+ href:
116
+ label:
117
+ navigation_links_columns:
115
118
  navigation_menu_heading:
116
119
  navigation_search_heading:
117
120
  navigation_search_subheading:
@@ -108,7 +108,10 @@ vi:
108
108
  menu_toggle_label:
109
109
  hide:
110
110
  show:
111
- navigation_links:
111
+ navigation_link:
112
+ href:
113
+ label:
114
+ navigation_links_columns:
112
115
  navigation_menu_heading:
113
116
  navigation_search_heading:
114
117
  navigation_search_subheading:
@@ -107,7 +107,10 @@ zh-hk:
107
107
  menu_toggle_label:
108
108
  hide:
109
109
  show:
110
- navigation_links:
110
+ navigation_link:
111
+ href:
112
+ label:
113
+ navigation_links_columns:
111
114
  navigation_menu_heading:
112
115
  navigation_search_heading:
113
116
  navigation_search_subheading:
@@ -107,7 +107,10 @@ zh-tw:
107
107
  menu_toggle_label:
108
108
  hide:
109
109
  show:
110
- navigation_links:
110
+ navigation_link:
111
+ href:
112
+ label:
113
+ navigation_links_columns:
111
114
  navigation_menu_heading:
112
115
  navigation_search_heading:
113
116
  navigation_search_subheading:
@@ -107,7 +107,10 @@ zh:
107
107
  menu_toggle_label:
108
108
  hide:
109
109
  show:
110
- navigation_links:
110
+ navigation_link:
111
+ href:
112
+ label:
113
+ navigation_links_columns:
111
114
  navigation_menu_heading:
112
115
  navigation_search_heading:
113
116
  navigation_search_subheading:
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "34.0.0".freeze
2
+ VERSION = "34.1.1".freeze
3
3
  end
@@ -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 ContextObject = {
53
- include?: Node | BaseSelector | Array<Node | BaseSelector | BaseSelector[]>;
54
- exclude?: Node | BaseSelector | Array<Node | BaseSelector | BaseSelector[]>;
55
- };
54
+ type ShadowDomSelector = MultiArray<BaseSelector>;
55
+ type CrossTreeSelector = BaseSelector | ShadowDomSelector;
56
+ type LabelledShadowDomSelector = { fromShadowDom: ShadowDomSelector };
56
57
 
57
- type SerialContextObject = {
58
- include?: BaseSelector | Array<BaseSelector | BaseSelector[]>;
59
- exclude?: BaseSelector | Array<BaseSelector | BaseSelector[]>;
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 RunCallback = (error: Error, results: AxeResults) => void;
85
+ type SerialSelector =
86
+ | BaseSelector
87
+ | LabelledShadowDomSelector
88
+ | LabelledFramesSelector;
89
+ type SerialFrameSelector = SerialSelector | FramesSelector;
90
+ type SerialSelectorList = Array<SerialFrameSelector>;
63
91
 
64
- type ElementContext = Node | NodeList | string | ContextObject;
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: CrossFrameSelector;
301
+ selector: UnlabelledFrameSelector;
259
302
  xpath: string[];
260
- ancestry: CrossFrameSelector;
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: SerialContextObject;
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<AxeResults>;
317
- function run(options: RunOptions): Promise<AxeResults>;
318
- function run(callback: (error: Error, results: AxeResults) => void): void;
319
- function run(context: ElementContext, callback: RunCallback): void;
320
- function run(options: RunOptions, callback: RunCallback): void;
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<AxeResults>;
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
  /**