govuk_publishing_components 40.0.0 → 40.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7549542613f4e292d7c1b07b47b7678643540bd2e70d4b18c849ece2fe9c07eb
4
- data.tar.gz: b5b13ebd6b6ff68286d727b6727be266b7ff65a2e7ad78c4fbd827939bf0af07
3
+ metadata.gz: c5fc5e9c02a30ad0e7d1d21d034da01775c4f1f5a2f2a40e4b5d0693dae48033
4
+ data.tar.gz: 84697249d14727c29b934bf5fe9403f580711421da5f1b1172d1af734b8989b6
5
5
  SHA512:
6
- metadata.gz: 02ef36351e28450a690811db4d7ab146dd548fc8452ab394011eb913e7bf43826df0a1767ea4ea9ec41c48642640e75ae56e705331e9e370011bbe42beac97b8
7
- data.tar.gz: 192ee48487aa006b6bc21509a74f90c284ca2166990ec4d354bd0ea762d7b39c0bda9179a93cb826cec4ae3e801bbd05d49b47d82c7f2ded3dba4297477d5b5c
6
+ metadata.gz: d9b3f9730f1636e7a5ae8f78227fd96ba87ba5f4365c1f6f624c4383be524a68aa414ba6091cdda40e46db5cfd9bb3fb7c695598dec75260a95417b89e96ac35
7
+ data.tar.gz: ecd0031c1d3a84d47cebc523bf34fc80554f12a843a3864b9ca1c05641380d8c1044532c876cf8f70cbb16665ba448438594c25e107334fe5c11161a5f33f5c4
@@ -347,6 +347,7 @@
347
347
  label_custom_class: "gem-c-layout-super-navigation-header__search-label--large-navbar",
348
348
  size: "large",
349
349
  margin_bottom: 0,
350
+ disable_corrections: true,
350
351
  data_attributes: {
351
352
  track_category: "headerClicked",
352
353
  track_action: "searchSubmitted",
@@ -6,6 +6,7 @@
6
6
 
7
7
  aria_controls ||= nil
8
8
  button_text ||= t("components.search_box.search_button")
9
+ correction_value = "off" if local_assigns[:disable_corrections]
9
10
  id ||= "search-main-" + SecureRandom.hex(4)
10
11
  wrap_label_in_a_heading ||= false
11
12
  label_margin_bottom ||= nil
@@ -73,6 +74,8 @@
73
74
  title: t("components.search_box.input_title"),
74
75
  type: "search",
75
76
  value: value,
77
+ autocorrect: correction_value,
78
+ autocapitalize: correction_value,
76
79
  ) %>
77
80
  <div class="gem-c-search__item gem-c-search__submit-wrapper">
78
81
  <%= tag.button class: "gem-c-search__submit", type: "submit", data: data_attributes, enterkeyhint: "search" do %>
@@ -113,3 +113,15 @@ examples:
113
113
  Allows adding a custom class to the label of the component.
114
114
  data:
115
115
  label_custom_class: "govuk-heading-xl"
116
+ with_corrections_disabled:
117
+ description: |
118
+ Allows disabling mobile browser autocorrect features (`autocorrect` and `autocapitalize`
119
+ attributes) on the input field.
120
+
121
+ Mobile browser autocorrect and text substitution features can conflict with the built in
122
+ autocorrect features of some search engines, and will frequently correct domain-specific
123
+ search terms to something that is not what the user intended (for example, correcting "SORN"
124
+ to "sworn" or "HMRC" to "Hercules"). Capitalisation can also be significant for some search
125
+ engines such as that currently used by Search API v2.
126
+ data:
127
+ disable_corrections: true
@@ -19,6 +19,7 @@
19
19
  id: "site-search-text",
20
20
  margin_bottom: 0,
21
21
  no_border: true,
22
+ disable_corrections: true,
22
23
  data_attributes: {
23
24
  track_category: "headerClicked",
24
25
  track_action: "searchSubmitted",
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "40.0.0".freeze
2
+ VERSION = "40.1.0".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: 40.0.0
4
+ version: 40.1.0
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: 2024-07-15 00:00:00.000000000 Z
11
+ date: 2024-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -1866,7 +1866,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1866
1866
  - !ruby/object:Gem::Version
1867
1867
  version: '0'
1868
1868
  requirements: []
1869
- rubygems_version: 3.5.15
1869
+ rubygems_version: 3.5.16
1870
1870
  signing_key:
1871
1871
  specification_version: 4
1872
1872
  summary: A gem to document components in GOV.UK frontend applications