Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.11.0 #2142

Merged
merged 1 commit into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.2
3.11.0
3 changes: 0 additions & 3 deletions dist/govuk-frontend-3.10.2.min.css

This file was deleted.

3 changes: 3 additions & 0 deletions dist/govuk-frontend-3.11.0.min.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/govuk-frontend-ie8-3.10.2.min.css

This file was deleted.

1 change: 1 addition & 0 deletions dist/govuk-frontend-ie8-3.11.0.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package/govuk/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ function CharacterCount ($module) {
this.$module = $module;
this.$textarea = $module.querySelector('.govuk-js-character-count');
if (this.$textarea) {
this.$countMessage = $module.querySelector('[id=' + this.$textarea.id + '-info]');
this.$countMessage = $module.querySelector('[id="' + this.$textarea.id + '-info"]');
}
}

Expand Down
1 change: 1 addition & 0 deletions package/govuk/components/_all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@import "button/index";
@import "checkboxes/index";
@import "character-count/index";
@import "cookie-banner/index";
@import "summary-list/index";
@import "date-input/index";
@import "details/index";
Expand Down
20 changes: 10 additions & 10 deletions package/govuk/components/breadcrumbs/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
"hidden": false
},
{
Expand All @@ -28,7 +28,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n </ol>\n</div>",
"hidden": false
},
{
Expand All @@ -53,7 +53,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section/sub-sub-section\">Sub Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\">Section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section\">Sub-section</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section/sub-section/sub-sub-section\">Sub Sub-section</a>\n </li>\n \n \n </ol>\n</div>",
"hidden": false
},
{
Expand All @@ -70,7 +70,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual\">Service Manual</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual/agile-delivery\">Agile Delivery</a>\n </li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual\">Service Manual</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/service-manual/agile-delivery\">Agile Delivery</a>\n </li>\n \n \n </ol>\n</div>",
"hidden": false
},
{
Expand All @@ -90,7 +90,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/browse/abroad\">Passports, travel and living abroad</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Travel abroad</li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/browse/abroad\">Passports, travel and living abroad</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Travel abroad</li>\n \n \n </ol>\n</div>",
"hidden": false
},
{
Expand All @@ -112,7 +112,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education\">Education, training and skills</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education/special-educational-needs-and-disability-send-and-high-needs\">Special educational needs and disability (SEND) and high needs</a>\n </li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/\">Home</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education\">Education, training and skills</a>\n </li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/education/special-educational-needs-and-disability-send-and-high-needs\">Special educational needs and disability (SEND) and high needs</a>\n </li>\n \n \n </ol>\n</div>",
"hidden": false
},
{
Expand Down Expand Up @@ -141,7 +141,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \" id=\"my-navigation\" role=\"navigation\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Home</li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\" id=\"my-navigation\" role=\"navigation\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">Home</li>\n \n \n </ol>\n</div>",
"hidden": true
},
{
Expand All @@ -158,7 +158,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">Section 1</a>\n </li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section\" data-attribute=\"my-attribute\" data-attribute-2=\"my-attribute-2\">Section 1</a>\n </li>\n \n \n </ol>\n</div>",
"hidden": true
},
{
Expand All @@ -170,7 +170,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">&lt;span&gt;Section 1&lt;/span&gt;</li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\">&lt;span&gt;Section 1&lt;/span&gt;</li>\n \n \n </ol>\n</div>",
"hidden": true
},
{
Expand All @@ -186,7 +186,7 @@
}
]
},
"html": "<div class=\"govuk-breadcrumbs \">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><em>Section 1</em></li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-2\"><em>Section 2</em></a>\n </li>\n \n \n </ol>\n</div>",
"html": "<div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n \n \n <li class=\"govuk-breadcrumbs__list-item\" aria-current=\"page\"><em>Section 1</em></li>\n \n \n \n <li class=\"govuk-breadcrumbs__list-item\">\n <a class=\"govuk-breadcrumbs__link\" href=\"/section-2\"><em>Section 2</em></a>\n </li>\n \n \n </ol>\n</div>",
"hidden": true
}
]
Expand Down
4 changes: 2 additions & 2 deletions package/govuk/components/breadcrumbs/template.njk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{# Set classes for this component #}
{%- set classNames = "govuk-breadcrumbs " -%}
{%- set classNames = "govuk-breadcrumbs" -%}

{% if params.classes %}
{% set classNames = classNames + params.classes %}
{% set classNames = classNames + " " + params.classes %}
{% endif -%}

{% if params.collapseOnMobile %}
Expand Down
2 changes: 2 additions & 0 deletions package/govuk/components/button/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
position: relative;
width: 100%;
margin-top: 0;
margin-right: 0;
margin-left: 0;
@include govuk-responsive-margin(6, "bottom", $adjustment: $button-shadow-size); // s2
padding: (govuk-spacing(2) - $govuk-border-width-form-element) govuk-spacing(2) (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)); // s1
border: $govuk-border-width-form-element solid transparent;
Expand Down
1 change: 1 addition & 0 deletions package/govuk/components/character-count/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
}

.govuk-character-count__message {
@include govuk-font($size: false, $tabular: true);
margin-top: 0;
margin-bottom: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ function CharacterCount ($module) {
this.$module = $module;
this.$textarea = $module.querySelector('.govuk-js-character-count');
if (this.$textarea) {
this.$countMessage = $module.querySelector('[id=' + this.$textarea.id + '-info]');
this.$countMessage = $module.querySelector('[id="' + this.$textarea.id + '-info"]');
}
}

Expand Down
13 changes: 13 additions & 0 deletions package/govuk/components/character-count/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,19 @@
},
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-custom-error-class\">\n With custom error class\n </label>\n\n\n \n \n <span id=\"with-custom-error-class-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </span>\n\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count govuk-textarea--error app-character-count--custom-modifier\" id=\"with-custom-error-class\" name=\"with-custom-error-class\" rows=\"5\" aria-describedby=\"with-custom-error-class-info with-custom-error-class-error\"></textarea>\n</div>\n\n <div id=\"with-custom-error-class-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
"hidden": true
},
{
"name": "with id starting with number",
"options": {
"name": "more-detail",
"id": "1_more-detail",
"maxlength": 10,
"label": {
"text": "Can you provide more detail?"
}
},
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n \n\n<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"1_more-detail\">\n Can you provide more detail?\n </label>\n\n\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"1_more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"1_more-detail-info\"></textarea>\n</div>\n\n <div id=\"1_more-detail-info\" class=\"govuk-hint govuk-character-count__message\" aria-live=\"polite\">\n You can enter up to 10 characters\n</div>\n\n</div>",
"hidden": true
}
]
}
2 changes: 2 additions & 0 deletions package/govuk/components/cookie-banner/_cookie-banner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "../../base";
@import "./index";
51 changes: 51 additions & 0 deletions package/govuk/components/cookie-banner/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@include govuk-exports("govuk/component/cookie-banner") {

// This needs to be kept in sync with the header component's styles
$border-bottom-width: govuk-spacing(2);

.govuk-cookie-banner {
@include govuk-font($size: 19);

padding-top: govuk-spacing(4);
// The component does not set bottom spacing.
// The bottom spacing should be created by the items inside the component.

// Visually separate the cookie banner from content underneath
// when user changes colours in their browser.
border-bottom: $border-bottom-width solid transparent;

background-color: govuk-colour("light-grey", $legacy: "grey-3");
}

// Support older browsers which don't hide elements with the `hidden` attribute
// when user hides the whole cookie banner with a 'Hide' button.
.govuk-cookie-banner[hidden] {
display: none;
}

.govuk-cookie-banner__message {
// Remove the extra height added by the separator border.
margin-bottom: -$border-bottom-width;

&[hidden] {
// Support older browsers which don't hide elements with the `hidden` attribute
// when the visibility of cookie and replacement messages is toggled.
display: none;
}

&:focus {
// Remove the native visible focus indicator when the element is programmatically focused.
//
// The focused cookie banner is the first element on the page and the last thing the user
// interacted with prior to it gaining focus.
// We therefore assume that moving focus to it is not going to surprise users, and that giving
// it a visible focus indicator could be more confusing than helpful, especially as the
// element is not normally keyboard operable.
//
// We have flagged this in the research section of the guidance as something to monitor.
//
// A related discussion: https://github.com/w3c/wcag/issues/1001
outline: none;
}
}
}
Loading