govuk_publishing_components 21.66.2 → 21.66.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af7d82223019f23f4e23fe004eef89ba49fb8720447e9c88243c007dee32bfed
4
- data.tar.gz: 1453e76cefe515b3e19d0641f45da54362845eb3a6cd1f8b777a86aecd3c79f3
3
+ metadata.gz: 7dde9e7cc89ab9b102414add462ef9e8a85a1dddfb1b172fbc01e077a613312f
4
+ data.tar.gz: e1402ae8bcb0dade6fad52b5e3f33689319ee32f4cb86229947760bc3021e48e
5
5
  SHA512:
6
- metadata.gz: 46c4d14d1743512c7c738734781daddb789d1f78a0253d9670a20b9a8242ae75167364ab14d808396f2db8db3e47a1882c9d4625036900a4ec43abae9755c914
7
- data.tar.gz: e81d1abeed8ea158022a62c5ed4707174a05678de0f31d9428634b78e104780dc8c868fb9845d58b5d219aba8fd1a46e9bd9459e0c94e1f27831d3b69f6fd07c
6
+ metadata.gz: 9739fca8bdb77b7f4a67ee620c08a575782ce0e479fd7cf03f0520eb41d7e524398723bb5ea30a7ff583c2c86c826dd7e6c375c5d51c8d4480dcbe504182516f
7
+ data.tar.gz: 51c29f5094ef43a28fa8804990926b1bc3ac156f983e09d25b999e215e695c2c7d056ed07b41ba021ff52611e5a30ef046d6cf37d45d2dd76446cc1b38d061af
@@ -1,6 +1,6 @@
1
1
  <%-
2
2
  cl_helper = GovukPublishingComponents::Presenters::ContentsListHelper.new(local_assigns)
3
- aria_label ||= nil
3
+ aria_label ||= "Contents"
4
4
  format_numbers ||= false
5
5
  hide_title ||= false
6
6
 
@@ -17,9 +17,7 @@ accessibility_criteria: |
17
17
  - inform the user how many items are in the list
18
18
  - convey the content structure
19
19
  - indicate the current page when contents span different pages, and not link to itself
20
-
21
- The contents list may:
22
- - include an aria-label to contextualise the list if helpful
20
+ - include an aria-label to contextualise the list
23
21
 
24
22
  Links with formatted numbers must separate the number and text with a space for correct screen reader pronunciation. This changes pronunciation from "1 dot Item" to "1 Item".
25
23
  shared_accessibility_criteria:
@@ -67,8 +65,8 @@ examples:
67
65
  active: true
68
66
  - href: "#third-thing"
69
67
  text: Third thing
70
- aria_label:
71
- description: 'An aria-label string can be used to contextualise the navigation for assistive technology.'
68
+ with_custom_aria_label:
69
+ description: 'An aria-label string should be used to contextualise the navigation for assistive technology. Defaults to "Contents" if aria-label is not passed.'
72
70
  data:
73
71
  aria_label: "Pages in this guide"
74
72
  contents:
@@ -191,3 +191,12 @@ examples:
191
191
  brand: cabinet-office
192
192
  crest: 'single-identity'
193
193
  inline: true
194
+ with-explicit-language:
195
+ description: The language attribute on the name of the organisation can be set if required. If this option is not passed, no lang attribute is set.
196
+ data:
197
+ organisation:
198
+ name: Tŷ'r Cwmnïau
199
+ url: '/government/organisations/companies-house.cy'
200
+ brand: department-for-business-innovation-skills
201
+ crest: 'single-identity'
202
+ lang: "cy"
@@ -11,6 +11,7 @@ module GovukPublishingComponents
11
11
  @url = local_assigns[:organisation][:url]
12
12
  @crest = local_assigns[:organisation][:crest]
13
13
  @image = local_assigns[:organisation][:image] || false
14
+ @lang = local_assigns[:lang] || nil
14
15
  if @image
15
16
  @logo_image_src = local_assigns[:organisation][:image][:url] || false
16
17
  @logo_image_alt = local_assigns[:organisation][:image][:alt_text] || false
@@ -21,7 +22,7 @@ module GovukPublishingComponents
21
22
  if image
22
23
  image_tag(logo_image_src, alt: logo_image_alt, class: "gem-c-organisation-logo__image")
23
24
  else
24
- content_tag("span", name, class: "gem-c-organisation-logo__name")
25
+ content_tag("span", name, class: "gem-c-organisation-logo__name", lang: @lang)
25
26
  end
26
27
  end
27
28
 
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.66.2".freeze
2
+ VERSION = "21.66.3".freeze
3
3
  end
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.66.2
4
+ version: 21.66.3
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-09-18 00:00:00.000000000 Z
11
+ date: 2020-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config