govuk_publishing_components 70.2.1 → 71.0.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 (103) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-page-views.js +19 -2
  3. data/app/assets/javascripts/govuk_publishing_components/components/govspeak.js +9 -0
  4. data/app/assets/javascripts/govuk_publishing_components/components/step-by-step-nav.js +1 -1
  5. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/table-scroll.js +108 -0
  6. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +2 -2
  7. data/app/assets/stylesheets/component_guide/application.scss +7 -3
  8. data/app/assets/stylesheets/govuk_publishing_components/all-components.scss +0 -1
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_cards.scss +0 -13
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_chart.scss +31 -6
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +0 -4
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_service-navigation.scss +1 -0
  13. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +67 -0
  14. data/app/views/govuk_publishing_components/components/_chart.html.erb +5 -5
  15. data/app/views/govuk_publishing_components/components/_metadata.html.erb +0 -6
  16. data/app/views/govuk_publishing_components/components/_radio.html.erb +1 -2
  17. data/app/views/govuk_publishing_components/components/docs/chart.yml +76 -2
  18. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +28 -0
  19. data/app/views/govuk_publishing_components/components/docs/metadata.yml +12 -12
  20. data/app/views/govuk_publishing_components/components/docs/service_navigation.yml +37 -1
  21. data/config/locales/ar.yml +2 -10
  22. data/config/locales/az.yml +2 -10
  23. data/config/locales/be.yml +2 -10
  24. data/config/locales/bg.yml +2 -10
  25. data/config/locales/bn.yml +2 -10
  26. data/config/locales/cs.yml +2 -10
  27. data/config/locales/cy.yml +6 -14
  28. data/config/locales/da.yml +2 -10
  29. data/config/locales/de.yml +2 -10
  30. data/config/locales/dr.yml +2 -10
  31. data/config/locales/el.yml +2 -10
  32. data/config/locales/en.yml +14 -22
  33. data/config/locales/es-419.yml +2 -10
  34. data/config/locales/es.yml +2 -10
  35. data/config/locales/et.yml +2 -10
  36. data/config/locales/fa.yml +2 -10
  37. data/config/locales/fi.yml +2 -10
  38. data/config/locales/fr.yml +2 -10
  39. data/config/locales/gd.yml +2 -10
  40. data/config/locales/gu.yml +2 -10
  41. data/config/locales/he.yml +2 -10
  42. data/config/locales/hi.yml +2 -10
  43. data/config/locales/hr.yml +2 -10
  44. data/config/locales/hu.yml +2 -10
  45. data/config/locales/hy.yml +2 -10
  46. data/config/locales/id.yml +2 -10
  47. data/config/locales/is.yml +2 -10
  48. data/config/locales/it.yml +2 -10
  49. data/config/locales/ja.yml +2 -10
  50. data/config/locales/ka.yml +2 -10
  51. data/config/locales/kk.yml +2 -10
  52. data/config/locales/ko.yml +2 -10
  53. data/config/locales/ku.yml +2 -10
  54. data/config/locales/ky.yml +2 -10
  55. data/config/locales/lt.yml +2 -10
  56. data/config/locales/lv.yml +2 -10
  57. data/config/locales/ms.yml +2 -10
  58. data/config/locales/mt.yml +2 -10
  59. data/config/locales/ne.yml +2 -10
  60. data/config/locales/nl.yml +2 -10
  61. data/config/locales/no.yml +2 -10
  62. data/config/locales/pa-pk.yml +2 -10
  63. data/config/locales/pa.yml +2 -10
  64. data/config/locales/pl.yml +2 -10
  65. data/config/locales/ps.yml +2 -10
  66. data/config/locales/pt.yml +2 -10
  67. data/config/locales/ro.yml +2 -10
  68. data/config/locales/ru.yml +2 -10
  69. data/config/locales/si.yml +2 -10
  70. data/config/locales/sk.yml +2 -10
  71. data/config/locales/sl.yml +2 -10
  72. data/config/locales/so.yml +2 -10
  73. data/config/locales/sq.yml +2 -10
  74. data/config/locales/sr.yml +2 -10
  75. data/config/locales/sv.yml +2 -10
  76. data/config/locales/sw.yml +2 -10
  77. data/config/locales/ta.yml +2 -10
  78. data/config/locales/th.yml +2 -10
  79. data/config/locales/ti.yml +2 -10
  80. data/config/locales/tk.yml +2 -10
  81. data/config/locales/tr.yml +2 -10
  82. data/config/locales/uk.yml +2 -10
  83. data/config/locales/ur.yml +2 -10
  84. data/config/locales/uz.yml +2 -10
  85. data/config/locales/vi.yml +2 -10
  86. data/config/locales/zh-hk.yml +2 -10
  87. data/config/locales/zh-tw.yml +2 -10
  88. data/config/locales/zh.yml +2 -10
  89. data/lib/govuk_publishing_components/presenters/chart_helper.rb +33 -12
  90. data/lib/govuk_publishing_components/version.rb +1 -1
  91. data/node_modules/axe-core/README.md +1 -0
  92. data/node_modules/axe-core/axe.js +7695 -3210
  93. data/node_modules/axe-core/axe.min.js +2 -2
  94. data/node_modules/axe-core/locales/_template.json +46 -20
  95. data/node_modules/axe-core/locales/az.json +1161 -0
  96. data/node_modules/axe-core/locales/de.json +1 -1
  97. data/node_modules/axe-core/package.json +7 -8
  98. data/node_modules/axe-core/sri-history.json +4 -0
  99. metadata +4 -6
  100. data/app/assets/javascripts/govuk_publishing_components/components/metadata.js +0 -24
  101. data/app/assets/stylesheets/govuk_publishing_components/components/_published-dates.scss +0 -55
  102. data/app/views/govuk_publishing_components/components/_published_dates.html.erb +0 -48
  103. data/app/views/govuk_publishing_components/components/docs/published_dates.yml +0 -37
@@ -441,9 +441,13 @@
441
441
  "pass": "ARIA attributes are used correctly for the defined role",
442
442
  "fail": {
443
443
  "singular": "ARIA attribute is not allowed: ${data.values}",
444
- "plural": "ARIA attributes are not allowed: ${data.values}"
444
+ "plural": "ARIA attributes are not allowed: ${data.values}",
445
+ "caseSensitive": "The following ARIA attributes have case-sensitive values that must be lowercase: ${data.values}"
445
446
  },
446
- "incomplete": "Check that there is no problem if the ARIA attribute is ignored on this element: ${data.values}"
447
+ "incomplete": {
448
+ "default": "Check that there is no problem if the ARIA attribute is ignored on this element: ${data.values}",
449
+ "caseSensitive": "The following ARIA attributes have case-sensitive values that might not be handled correctly by assistive technologies: ${data.values}"
450
+ }
447
451
  },
448
452
  "aria-allowed-role": {
449
453
  "pass": "ARIA role is allowed for given element",
@@ -503,14 +507,14 @@
503
507
  "fail": {
504
508
  "hasRolePlural": "${data.prohibited} attributes cannot be used with role \"${data.role}\".",
505
509
  "hasRoleSingular": "${data.prohibited} attribute cannot be used with role \"${data.role}\".",
506
- "noRolePlural": "${data.prohibited} attributes cannot be used on a ${data.nodeName} with no valid role attribute.",
507
- "noRoleSingular": "${data.prohibited} attribute cannot be used on a ${data.nodeName} with no valid role attribute."
510
+ "noRolePlural": "${data.prohibited} attributes cannot be used on \"${data.nodeName}\" elements with no valid role attribute.",
511
+ "noRoleSingular": "${data.prohibited} attribute cannot be used on \"${data.nodeName}\" elements with no valid role attribute."
508
512
  },
509
513
  "incomplete": {
510
514
  "hasRoleSingular": "${data.prohibited} attribute is not well supported with role \"${data.role}\".",
511
515
  "hasRolePlural": "${data.prohibited} attributes are not well supported with role \"${data.role}\".",
512
- "noRoleSingular": "${data.prohibited} attribute is not well supported on a ${data.nodeName} with no valid role attribute.",
513
- "noRolePlural": "${data.prohibited} attributes are not well supported on a ${data.nodeName} with no valid role attribute.",
516
+ "noRoleSingular": "${data.prohibited} attribute is not well supported on \"${data.nodeName}\" elements with no valid role attribute.",
517
+ "noRolePlural": "${data.prohibited} attributes are not well supported on \"${data.nodeName}\" elements with no valid role attribute.",
514
518
  "visibleLabelSingular": "${data.prohibited} attribute is not well supported, but the elements referenced by aria-labelledby are visible in the page. Verify the label is not necessary.",
515
519
  "visibleLabelPlural": "${data.prohibited} attributes are not well supported, but the elements referenced by aria-labelledby are visible in the page. Verify the labels are not necessary.",
516
520
  "unresolvedLabel": "${data.prohibited} attribute is not well supported, and does not reference an existing element. Verify the label is not necessary."
@@ -532,6 +536,7 @@
532
536
  "singular": "Required ARIA child role not present: ${data.values}",
533
537
  "plural": "Required ARIA children role not present: ${data.values}",
534
538
  "unallowed": "Element has children which are not allowed: ${data.values}",
539
+ "unallowedPresentational": "Element has presentational children which cannot be ignored because of ${data.values}",
535
540
  "aria-busy-fail": "Element has children which are not allowed: ${data.values}; Having aria-busy=\"true\" does not allow children with roles that are not allowed"
536
541
  },
537
542
  "incomplete": {
@@ -651,6 +656,7 @@
651
656
  "outsideViewport": "Element's background color could not be determined because it's outside the viewport",
652
657
  "equalRatio": "Element has a 1:1 contrast ratio with the background",
653
658
  "shortTextContent": "Element content is too short to determine if it is actual text content",
659
+ "emptyValue": "Element has no value; test color contrast with a value entered",
654
660
  "nonBmp": "Element content contains only non-text characters",
655
661
  "pseudoContent": "Element's background color could not be determined due to a pseudo element",
656
662
  "colorParse": "Could not parse color string ${data.colorParse}"
@@ -679,6 +685,7 @@
679
685
  "outsideViewport": "Element's background color could not be determined because it's outside the viewport",
680
686
  "equalRatio": "Element has a 1:1 contrast ratio with the background",
681
687
  "shortTextContent": "Element content is too short to determine if it is actual text content",
688
+ "emptyValue": "Element has no value; test color contrast with a value entered",
682
689
  "nonBmp": "Element content contains only non-text characters",
683
690
  "pseudoContent": "Element's background color could not be determined due to a pseudo element",
684
691
  "colorParse": "Could not parse color string ${data.colorParse}"
@@ -722,12 +729,13 @@
722
729
  },
723
730
  "focusable-content": {
724
731
  "pass": "Element contains focusable elements",
732
+ "incomplete": "Check that elements with a negative tabindex can receive keyboard focus so the region can be scrolled",
725
733
  "fail": "Element should have focusable content"
726
734
  },
727
735
  "focusable-disabled": {
728
736
  "pass": "No focusable elements contained within element",
729
737
  "incomplete": "Check if the focusable elements immediately move the focus indicator",
730
- "fail": "Focusable content should be disabled or be removed from the DOM"
738
+ "fail": "Focusable content should be disabled, be removed from the DOM, or not be hidden with aria-hidden"
731
739
  },
732
740
  "focusable-element": {
733
741
  "pass": "Element is focusable",
@@ -745,7 +753,7 @@
745
753
  "focusable-not-tabbable": {
746
754
  "pass": "No focusable elements contained within element",
747
755
  "incomplete": "Check if the focusable elements immediately move the focus indicator",
748
- "fail": "Focusable content should have tabindex=\"-1\" or be removed from the DOM"
756
+ "fail": "Focusable content should have tabindex=\"-1\", be removed from the DOM, or not be hidden with aria-hidden"
749
757
  },
750
758
  "frame-focusable-content": {
751
759
  "pass": "Element does not have focusable descendants",
@@ -759,7 +767,7 @@
759
767
  "no-focusable-content": {
760
768
  "pass": "Element does not have focusable descendants",
761
769
  "fail": {
762
- "default": "Element has focusable descendants",
770
+ "default": "Element has focusable descendants. Move them outside of the element, or remove them.",
763
771
  "notHidden": "Using a negative tabindex on an element inside an interactive control does not prevent assistive technologies from focusing the element (even with aria-hidden=\"true\")"
764
772
  },
765
773
  "incomplete": "Could not determine if element has descendants"
@@ -816,8 +824,12 @@
816
824
  "incomplete": "Unable to determine if form element has an implicit (wrapped) <label>"
817
825
  },
818
826
  "label-content-name-mismatch": {
819
- "pass": "Element contains visible text as part of it's accessible name",
820
- "fail": "Text inside the element is not included in the accessible name"
827
+ "pass": "Element contains visible text as part of its accessible name",
828
+ "fail": "Text inside the element is not included in the accessible name",
829
+ "incomplete": {
830
+ "default": "Unable to determine if the visible text is part of the accessible name",
831
+ "valueText": "Text inside the element may be value text rather than a label"
832
+ }
821
833
  },
822
834
  "multiple-label": {
823
835
  "pass": "Form field does not have multiple label elements",
@@ -853,17 +865,20 @@
853
865
  "listitem": {
854
866
  "pass": "List item has a <ul>, <ol> or role=\"list\" parent element",
855
867
  "fail": {
856
- "default": "List item does not have a <ul>, <ol> parent element",
857
- "roleNotValid": "List item parent element has a role that is not role=\"list\""
858
- }
868
+ "default": "List item does not have a <ul> or <ol> parent element. Ensure the <li> is a direct child of a <ul> or <ol>, or that the parent has role=\"list\".",
869
+ "roleNotValid": "List item parent element has a role that is not role=\"list\". Ensure the parent element has role=\"list\", or move the <li> inside a <ul> or <ol>."
870
+ },
871
+ "incomplete": "Unable to determine if list item has a <ul>, <ol> or role=\"list\" parent element"
859
872
  },
860
873
  "only-dlitems": {
861
874
  "pass": "dl element only has direct children that are allowed inside; <dt>, <dd>, or <div> elements",
862
- "fail": "dl element has direct children that are not allowed: ${data.values}"
875
+ "fail": "dl element has direct children that are not allowed: ${data.values}",
876
+ "incomplete": "Unable to determine if dl element only has allowed direct children"
863
877
  },
864
878
  "only-listitems": {
865
879
  "pass": "List element only has direct children that are allowed inside <li> elements",
866
- "fail": "List element has direct children that are not allowed: ${data.values}"
880
+ "fail": "List element has direct children that are not allowed: ${data.values}",
881
+ "incomplete": "Unable to determine if list element only has allowed direct children"
867
882
  },
868
883
  "structured-dlitems": {
869
884
  "pass": "When not empty, element has both <dt> and <dd> elements",
@@ -1029,15 +1044,27 @@
1029
1044
  },
1030
1045
  "important-letter-spacing": {
1031
1046
  "pass": "Letter-spacing in the style attribute is not set to !important, or meets the minimum",
1032
- "fail": "letter-spacing in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)"
1047
+ "fail": {
1048
+ "default": "letter-spacing in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)",
1049
+ "omitted": "letter-spacing in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em). More elements with text are affected than are listed as related nodes"
1050
+ },
1051
+ "incomplete": "Unable to determine if letter-spacing in the style attribute meets the minimum"
1033
1052
  },
1034
1053
  "important-line-height": {
1035
1054
  "pass": "line-height in the style attribute is not set to !important, or meets the minimum",
1036
- "fail": "line-height in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)"
1055
+ "fail": {
1056
+ "default": "line-height in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)",
1057
+ "omitted": "line-height in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em). More elements with text are affected than are listed as related nodes"
1058
+ },
1059
+ "incomplete": "Unable to determine if line-height in the style attribute meets the minimum"
1037
1060
  },
1038
1061
  "important-word-spacing": {
1039
1062
  "pass": "word-spacing in the style attribute is not set to !important, or meets the minimum",
1040
- "fail": "word-spacing in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)"
1063
+ "fail": {
1064
+ "default": "word-spacing in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em)",
1065
+ "omitted": "word-spacing in the style attribute must not use !important, or be at ${data.minValue}em (current ${data.value}em). More elements with text are affected than are listed as related nodes"
1066
+ },
1067
+ "incomplete": "Unable to determine if word-spacing in the style attribute meets the minimum"
1041
1068
  },
1042
1069
  "is-on-screen": {
1043
1070
  "pass": "Element is not visible",
@@ -1136,7 +1163,6 @@
1136
1163
  },
1137
1164
  "th-has-data-cells": {
1138
1165
  "pass": "All table header cells refer to data cells",
1139
- "fail": "Not all table header cells refer to data cells",
1140
1166
  "incomplete": "Table data cells are missing or empty"
1141
1167
  },
1142
1168
  "hidden-content": {