govuk_publishing_components 66.4.2 → 66.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +7 -1
  3. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +14 -32
  4. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +3 -1
  5. data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +231 -221
  6. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +13 -12
  7. data/app/views/govuk_publishing_components/components/_signup_link.html.erb +1 -1
  8. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +0 -19
  9. data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +12 -23
  10. data/app/views/govuk_publishing_components/components/docs/published_dates.yml +0 -6
  11. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +8 -0
  12. data/config/locales/en.yml +2 -2
  13. data/lib/govuk_publishing_components/version.rb +1 -1
  14. data/node_modules/axe-core/axe.d.ts +39 -1
  15. data/node_modules/axe-core/axe.js +1062 -534
  16. data/node_modules/axe-core/axe.min.js +2 -2
  17. data/node_modules/axe-core/gather-internals.js +219 -0
  18. data/node_modules/axe-core/locales/_template.json +5 -0
  19. data/node_modules/axe-core/locales/ja.json +1 -0
  20. data/node_modules/axe-core/locales/{no_NB.json → nb.json} +1 -1
  21. data/node_modules/axe-core/locales/pt_BR.json +1 -1
  22. data/node_modules/axe-core/locales/pt_PT.json +1 -1
  23. data/node_modules/axe-core/locales/zh_CN.json +1 -1
  24. data/node_modules/axe-core/locales/zh_TW.json +1 -1
  25. data/node_modules/axe-core/package.json +11 -6
  26. data/node_modules/axe-core/sri-history.json +4 -0
  27. metadata +4 -3
@@ -5,7 +5,7 @@
5
5
  link_href ||= false
6
6
  heading ||= false
7
7
  background ||= false
8
- data ||= false
8
+ data ||= nil
9
9
 
10
10
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
11
11
  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
@@ -30,25 +30,6 @@ examples:
30
30
  with_custom_cookie_preferences_href:
31
31
  data:
32
32
  cookie_preferences_href: "/cookies"
33
- in_services_asking_for_analytics_only:
34
- description: Use this type of banner in your service if it only uses cookies for analytics.
35
- data:
36
- title: Can we store analytics cookies on your device?
37
- text: Analytics cookies help us understand how our website is being used.
38
- confirmation_message: You’ve accepted all cookies. You can `<a class='govuk-link' href='/cookies'>change your cookie settings</a>` at any time.
39
- services_cookies:
40
- # yes and no must be quoted or are converted into booleans in the guide
41
- "yes":
42
- text: "Yes"
43
- data_attributes:
44
- an_attribute: some_value1
45
- "no":
46
- text: "No"
47
- data_attributes:
48
- an_attribute: some_value2
49
- cookie_preferences:
50
- text: How we use cookies
51
- href: "/cookies"
52
33
  without_ga4_tracking:
53
34
  description: |
54
35
  Disables GA4 tracking on the banner. Tracking is enabled by default. This includes link tracking on the "You have accepted cookies" section, and allows the pageview event that is sent when GA4 initialises to record the presence of the cookie acceptance message.
@@ -54,9 +54,18 @@ examples:
54
54
  description: This allows the HTML for the emergency banner to be added to the page in the correct place. This is only the slot for the emergency banner - the markup for the banner needs to be passed in.
55
55
  data:
56
56
  emergency_banner: <div class="govuk-!-padding-top-3 govuk-!-padding-bottom-3">This is the emergency banner slot</div>
57
- with_global_and_emergency_banner:
58
- description: Both global banner and emergency banner should be usable together.
59
- data:
57
+ with_phase_banner:
58
+ description: This allows the phase banner to be added to the page within the header.
59
+ data:
60
+ phase_banner:
61
+ phase: "beta"
62
+ message: "This is a custom test message for the public layout phase banner."
63
+ with_all_banners:
64
+ description: The phase banner, global banner and emergency banner should be usable together.
65
+ data:
66
+ phase_banner:
67
+ phase: "beta"
68
+ message: "This is the phase banner banner"
60
69
  emergency_banner: <div class="govuk-!-padding-top-3 govuk-!-padding-bottom-3">This is the emergency banner slot</div>
61
70
  global_banner: <div class="govuk-!-padding-top-5 govuk-!-padding-bottom-3">This is the global banner slot</div>
62
71
  with_account_layout_enabled:
@@ -90,26 +99,6 @@ examples:
90
99
  block: |
91
100
  <h2 class="govuk-heading-l">This is a title</h2>
92
101
  <p class="govuk-body">This is some body text with <a href="https://example.com">a link</a>.</p>
93
- with_custom_cookie_banner:
94
- description: Passes content through to the [cookie banner component](/component-guide/cookie_banner/).
95
- data:
96
- cookie_banner_data:
97
- title: Can we use cookies to collect information about how you use GOV.UK?
98
- text: Cookies help us see where we can make improvements to GOV.UK.
99
- confirmation_message: You have accepted cookies.
100
- cookie_preferences_href: https://www.gov.uk/government/publications/govuk-accounts-trial-full-privacy-notice-and-accessibility-statement
101
- services_cookies:
102
- yes:
103
- text: Yes
104
- data_attributes:
105
- an_attribute: some_value1
106
- no:
107
- text: No
108
- data_attributes:
109
- an_attribute: some_value2
110
- cookie_preferences:
111
- text: How GOV.UK accounts use cookies
112
- href: https://www.gov.uk/government/publications/govuk-accounts-trial-full-privacy-notice-and-accessibility-statement
113
102
  with_title_lang_attribute:
114
103
  data:
115
104
  title: 'Example layout'
@@ -20,12 +20,6 @@ examples:
20
20
  data:
21
21
  published: 1st January 1990
22
22
  last_updated: 20th October 2016
23
- link_to_page_history:
24
- description: This will set up a link to a '#history' anchor on the page. This can be used to link to another instance of this component, see [Display Page History example](/component-guide/published_dates/display_page_history)
25
- data:
26
- published: 1st January 1990
27
- last_updated: 20th October 2016
28
- link_to_history: true
29
23
  display_page_history:
30
24
  description: This will set up an expandable section on the page, with a top border, to let users toggle the display of the page history.
31
25
  data:
@@ -31,3 +31,11 @@ examples:
31
31
  link_text: 'Click right here to sign up!!'
32
32
  link_href: '/this-signs-you-up'
33
33
  heading_level: 1
34
+ with_data_attributes_on_the_link:
35
+ data:
36
+ heading: 'Sign up for email notifications'
37
+ link_text: 'Click right here to sign up!!'
38
+ link_href: '/this-signs-you-up'
39
+ data:
40
+ hello: world
41
+
@@ -284,11 +284,11 @@ en:
284
284
  text: Print this page
285
285
  published_dates:
286
286
  hidden_heading: Updates to this page
287
- hide_all_updates: hide all updates
287
+ hide_all_updates: Hide all updates
288
288
  last_updated: Last updated %{date}
289
289
  published: Published %{date}
290
290
  see_all_updates: See all updates
291
- show_all_updates: show all updates
291
+ show_all_updates: Show all updates
292
292
  radio:
293
293
  or: or
294
294
  related_footer_navigation:
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "66.4.2".freeze
2
+ VERSION = "66.5.0".freeze
3
3
  end
@@ -147,6 +147,9 @@ declare namespace axe {
147
147
  performanceTimer?: boolean;
148
148
  pingWaitTime?: number;
149
149
  }
150
+ interface NormalizedRunOptions extends RunOptions {
151
+ runOnly?: RunOnly;
152
+ }
150
153
  interface PreloadOptions {
151
154
  assets: string[];
152
155
  timeout?: number;
@@ -331,7 +334,7 @@ declare namespace axe {
331
334
  matches?: string | ((node: Element, virtualNode: VirtualNode) => boolean);
332
335
  reviewOnFail?: boolean;
333
336
  actIds?: string[];
334
- metadata?: Omit<RuleMetadata, 'ruleId' | 'tags' | 'actIds'>;
337
+ metadata?: Omit<RuleMetadata, 'ruleId' | 'tags' | 'actIds' | 'enabled'>;
335
338
  }
336
339
  interface AxePlugin {
337
340
  id: string;
@@ -349,6 +352,7 @@ declare namespace axe {
349
352
  helpUrl: string;
350
353
  tags: string[];
351
354
  actIds?: string[];
355
+ enabled: boolean;
352
356
  }
353
357
  interface SerialDqElement {
354
358
  source: string;
@@ -501,6 +505,7 @@ declare namespace axe {
501
505
  offset?: number
502
506
  ) => string | Uint8Array | Array<number>;
503
507
  nodeSerializer: NodeSerializer;
508
+ normalizeRunOptions: (options?: RunOptions) => NormalizedRunOptions;
504
509
  }
505
510
 
506
511
  interface Aria {
@@ -625,6 +630,14 @@ declare namespace axe {
625
630
  */
626
631
  function reset(): void;
627
632
 
633
+ /**
634
+ * Restores the default locale that was active before any
635
+ * `axe.configure({ locale })` call. No-op if no non-default
636
+ * locale has ever been applied. Does not affect any other
637
+ * configuration.
638
+ */
639
+ function resetLocale(): void;
640
+
628
641
  /**
629
642
  * Function to register a plugin configuration in document and its subframes
630
643
  * @param {Object} plugin A plugin configuration object
@@ -670,6 +683,31 @@ declare namespace axe {
670
683
  isDefault?: boolean
671
684
  ): void;
672
685
 
686
+ /**
687
+ * Run axe in the current window only
688
+ * @param {ElementContext} context Optional The `Context` specification object @see Context
689
+ * @param {RunOptions} options Optional Options passed into rules or checks, temporarily modifying them.
690
+ * @returns {Promise<PartialResult>} Partial result, for use in axe.finishRun.
691
+ */
692
+ function externalAPIs(params?: {
693
+ elementInternalsTimeout?: number;
694
+ getElementInternals?: () => Promise<ElementInternalsMap>;
695
+ }): void;
696
+
697
+ type ElementInternalsMap = Array<{
698
+ ancestry: CrossTreeSelector;
699
+ internals: Record<string, InternalsData>;
700
+ }>;
701
+ type InternalsData = string | InternalsDataIdref | InternalsDataIdrefs;
702
+ type InternalsDataIdref = {
703
+ type: 'HTMLElement';
704
+ value: CrossTreeSelector;
705
+ };
706
+ type InternalsDataIdrefs = {
707
+ type: 'NodeList';
708
+ value: CrossTreeSelector[];
709
+ };
710
+
673
711
  // axe.frameMessenger
674
712
  type FrameMessenger = {
675
713
  open: (topicHandler: TopicHandler) => Close | void;