govuk_tech_docs 3.2.1 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/publish.yaml +1 -1
  3. data/CHANGELOG.md +26 -7
  4. data/README.md +2 -2
  5. data/lib/assets/javascripts/_modules/search.js +2 -2
  6. data/lib/govuk_tech_docs/contribution_banner.rb +1 -1
  7. data/lib/govuk_tech_docs/version.rb +1 -1
  8. data/lib/source/layouts/core.erb +1 -1
  9. data/node_modules/govuk-frontend/govuk/all.js +1548 -311
  10. data/node_modules/govuk-frontend/govuk/common/closest-attribute-value.js +70 -0
  11. data/node_modules/govuk-frontend/govuk/common/index.js +172 -0
  12. data/node_modules/govuk-frontend/govuk/common/normalise-dataset.js +373 -0
  13. data/node_modules/govuk-frontend/govuk/common.js +138 -3
  14. data/node_modules/govuk-frontend/govuk/components/_all.scss +1 -0
  15. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +5 -6
  16. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +754 -36
  17. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +0 -2
  18. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +29 -21
  19. data/node_modules/govuk-frontend/govuk/components/button/button.js +365 -107
  20. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +9 -0
  21. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +1092 -109
  22. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +3 -2
  23. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +30 -2
  24. data/node_modules/govuk-frontend/govuk/components/details/details.js +51 -33
  25. data/node_modules/govuk-frontend/govuk/components/error-summary/error-summary.js +289 -6
  26. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +13 -23
  27. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +30 -24
  28. data/node_modules/govuk-frontend/govuk/components/header/header.js +59 -11
  29. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +13 -23
  30. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +252 -2
  31. data/node_modules/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  32. data/node_modules/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  33. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +1 -1
  34. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +5 -12
  35. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +30 -2
  36. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +11 -0
  37. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +1 -3
  38. data/node_modules/govuk-frontend/govuk/components/skip-link/skip-link.js +10 -4
  39. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +45 -13
  40. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +1 -1
  41. data/node_modules/govuk-frontend/govuk/components/tabs/tabs.js +28 -0
  42. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +1 -1
  43. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +5 -5
  44. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +5 -0
  45. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +13 -11
  46. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -2
  47. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  48. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -3
  49. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +16 -9
  50. data/node_modules/govuk-frontend/govuk/i18n.js +390 -0
  51. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +10 -26
  52. data/node_modules/govuk-frontend/govuk/objects/_template.scss +1 -1
  53. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +0 -4
  54. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +56 -12
  55. data/node_modules/govuk-frontend/govuk/settings/_all.scss +1 -0
  56. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +12 -0
  57. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +26 -0
  58. data/node_modules/govuk-frontend/govuk/settings/_spacing.scss +4 -8
  59. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +23 -0
  60. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +12 -0
  61. data/node_modules/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  62. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +20 -6
  63. data/node_modules/govuk-frontend/govuk/tools/_exports.scss +1 -1
  64. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -1
  65. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -1
  66. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +2 -2
  67. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  68. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Date/now.js +21 -0
  69. data/node_modules/govuk-frontend/govuk/vendor/polyfills/Element/prototype/dataset.js +300 -0
  70. data/node_modules/govuk-frontend/govuk/vendor/polyfills/String/prototype/trim.js +21 -0
  71. data/node_modules/govuk-frontend/govuk-prototype-kit/init.js +7 -0
  72. data/node_modules/govuk-frontend/govuk-prototype-kit/init.scss +12 -0
  73. data/package-lock.json +12 -12
  74. data/package.json +1 -1
  75. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79d38e9facb7df0c0a08151b51ce448759efa6e61bcf8ec0c5e6efb0b4e92332
4
- data.tar.gz: 0a47d960ef878bf334104c7f0ff3e3e07e0411e3b12d061dc72ca4c474c988a1
3
+ metadata.gz: e56428dbc592284d70ca0c9880c6c99fd10cd72da62a7008bbc11237e49c486c
4
+ data.tar.gz: b328aa30ba2a6fc8666abf3c9ede2a7a93639604ef0a1705626632479400f117
5
5
  SHA512:
6
- metadata.gz: 8a6e9076fc8b8a6ade8cca61c139256b6f8a455e851c64e68132ee25e9ec0fe09876e3cfb1bf813297779d376e91ac0f1abd49cd30319944249c6fff4117c902
7
- data.tar.gz: 98748cf227f452712eb2ffcd780d89a7b56b9beed437f0a775adb1eba81a0acfca7de59c89db7437484a8f8e9e63a1e71c513475f1f55affc8ff48b5da2fe64a
6
+ metadata.gz: c7aad01df604f63f875ecd96a9ace7f003e7a34eb6eb71c176e36cb1a11a8bf61af50231561338d8853c2c853e8d0aa5d69388f8ef7e5e83cf3355fc3b7cc9aa
7
+ data.tar.gz: c0f2915a6922e499f4ed1eb39262c7176bc64df8467a0be1ba1579af8cdea0fc6bef3c1415822f1aff6f80c679ed0d9fedce4a4ccd9799932bf0aabb196a4747
@@ -3,7 +3,7 @@ name: Publish
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - master
6
+ - main
7
7
  workflow_dispatch:
8
8
 
9
9
  concurrency: rubygems
data/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.3.1
6
+
7
+ This change solves a potential security issue with HTML snippets. Pages indexed in search results have their entire contents indexed, including any HTML code snippets. These HTML snippets would appear in the search results unsanitised, making it possible to render arbitrary HTML or run arbitrary scripts.
8
+
9
+ You can see more detail about this issue at [#323: Fix XSS vulnerability on search results page](https://github.com/alphagov/tech-docs-gem/pull/323)
10
+
11
+ ## 3.3.0
12
+
13
+ ### New features
14
+
15
+ There are some steps you should follow as the Technical Documentation Template (TDT) now uses GOV.UK Frontend 4.4.1.
16
+
17
+ 1. Update your documentation site to use the latest template version. You can [follow the TDT guidance on using the latest template version](https://tdt-documentation.london.cloudapps.digital/maintain_project/use_latest_template/).
18
+ 2. Check your documentation site displays correctly. If your site does not display correctly, you can refer to the [GOV.UK Frontend release notes](https://github.com/alphagov/govuk-frontend/releases/) for more information, or [contact the GOV.UK Design System team](https://design-system.service.gov.uk/get-in-touch/).
19
+
20
+ ### Fixes
21
+
22
+ - [#242: Make scrollable area keyboard (and voice) focusable](https://github.com/alphagov/tech-docs-gem/pull/242) (thanks [@colinbm](https://github.com/colinbm))
23
+
5
24
  ## 3.2.1
6
25
 
7
26
  ### Fixes
@@ -418,7 +437,7 @@ which item is selected in the navigation.
418
437
  More info:
419
438
 
420
439
  - https://github.com/alphagov/tech-docs-gem/pull/19
421
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#parent
440
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/frontmatter.md#parent
422
441
 
423
442
  ## 1.2.0
424
443
 
@@ -430,15 +449,15 @@ You can use this when you change a page URL.
430
449
 
431
450
  More info:
432
451
 
433
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#redirects
434
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#old_paths
452
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/configuration.md#redirects
453
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/frontmatter.md#old_paths
435
454
 
436
455
  ### New feature: contribution banner
437
456
 
438
457
  You can now show a block at the bottom of the page that links to
439
458
  the page source on GitHub, so readers can easily contribute back to the documentation.
440
459
 
441
- https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#show_contribution_banner
460
+ https://github.com/alphagov/tech-docs-gem/blob/main/docs/configuration.md#show_contribution_banner
442
461
 
443
462
  ### New feature: page review system
444
463
 
@@ -446,8 +465,8 @@ An optional page review system to make sure documentation stays up to date.
446
465
 
447
466
  More info:
448
467
 
449
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#last_reviewed_on
450
- - https://github.com/alphagov/tech-docs-gem/blob/master/docs/frontmatter.md#owner_slack
468
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/frontmatter.md#last_reviewed_on
469
+ - https://github.com/alphagov/tech-docs-gem/blob/main/docs/frontmatter.md#owner_slack
451
470
 
452
471
 
453
472
  ### Better meta tags
@@ -459,7 +478,7 @@ Pages now include better meta tags for search engines, Twitter, Facebook and Sla
459
478
  You can now specify `google_site_verification` in tech-docs.yml. You can use
460
479
  this to verify your site in Google Webmaster tools.
461
480
 
462
- https://github.com/alphagov/tech-docs-gem/blob/master/docs/configuration.md#google_site_verification
481
+ https://github.com/alphagov/tech-docs-gem/blob/main/docs/configuration.md#google_site_verification
463
482
 
464
483
  ## 1.0.0
465
484
 
data/README.md CHANGED
@@ -15,7 +15,7 @@ Find out how to [contribute](https://tdt-documentation.london.cloudapps.digital/
15
15
 
16
16
  This gem uses [GOV.UK Frontend](https://github.com/alphagov/govuk-frontend), part of the [GOV.UK Design System](https://design-system.service.gov.uk/).
17
17
 
18
- We use `npm` to download the govuk-frontend package. To update to a new version, change the version in the [package.json file](blob/master/package.json) and run `npm update`.
18
+ We use `npm` to download the govuk-frontend package. To update to a new version, change the version in the [package.json file](package.json) and run `npm update`.
19
19
 
20
20
  ## Developing locally
21
21
 
@@ -96,7 +96,7 @@ The documentation is [© Crown copyright][copyright] and available under the ter
96
96
  [ogl]: http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
97
97
  [tdt-docs]: https://tdt-documentation.london.cloudapps.digital
98
98
  [tdt-template]: https://github.com/alphagov/tech-docs-template
99
- [tdt-readme]: https://github.com/alphagov/tech-docs-template/blob/master/README.md
99
+ [tdt-readme]: https://github.com/alphagov/tech-docs-template/blob/main/README.md
100
100
  [mmt]: https://middlemanapp.com/advanced/project_templates/
101
101
 
102
102
  [jas]: https://jasmine.github.io/
@@ -169,8 +169,8 @@
169
169
 
170
170
  this.processContent = function processContent (content, query) {
171
171
  var output
172
- content = '<div>' + content + '</div>'
173
- content = $(content).mark(query)
172
+ var sanitizedContent = $('<div></div>').text(content).html()
173
+ content = $('<div>' + sanitizedContent + '</div>').mark(query)
174
174
 
175
175
  // Split content by sentence.
176
176
  var sentences = content.html().replace(/(\.+|:|!|\?|\r|\n)("*|'*|\)*|}*|]*)/gm, '|').split('|')
@@ -39,7 +39,7 @@ module GovukTechDocs
39
39
  end
40
40
 
41
41
  def repo_branch
42
- config[:tech_docs][:github_branch] || "master"
42
+ config[:tech_docs][:github_branch] || "master" # TODO: change this to 'main' in a future breaking release
43
43
  end
44
44
 
45
45
  private
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "3.2.1".freeze
2
+ VERSION = "3.3.1".freeze
3
3
  end
@@ -53,7 +53,7 @@
53
53
  </div>
54
54
  <% end %>
55
55
 
56
- <div class="app-pane__content toc-open-disabled">
56
+ <div class="app-pane__content toc-open-disabled" aria-label="Content" tabindex="0">
57
57
  <main id="content" class="technical-documentation" data-module="anchored-headings">
58
58
  <%= yield %>
59
59
  <%= partial "layouts/page_review" %>