nhsuk-frontend
Advanced tools
Changelog
2.1.0 - 8 April 2019
:new: New features
Hero component - removed background image and arrow and tidied up area around the hero with image and content when in Windows high contrast mode. (PR 435)
Add transparent 1px border around promos which appears as a solid border when in Windows high contrast mode. (PR 433)
Fluid width container - Extend the page layout to include a fluid-width container, which spans the entire width of the viewport.
Use .nhsuk-width-container-fluid
for a full width container. Documentation and an example of the fluid-width container can be found on the Layout page in the NHS digital service manual.
(Issue 416)
Prefix error messages with a visually hidden "Error:", to make it clearer to users of assistive technologies.
Add example and code snippets for a Button as a link and remove the multiple examples for the disabled Button. The Button as a link includes the attribute draggable="false"
to stop links that are styled as button from being dragged.
Enable autocomplete
attributes for input components. The autocomplete
attribute can now be enabled on input, date input and textarea components using the component macros parameters.
This was already possible to do with the attributes
option but this change highlights the new WCAG 2.1 success criteria Identify Input Purpose which "is to ensure that the purpose of a form input collecting information about the user can be programmatically determined, so that user agents can extract and present this purpose to users using different modalities".
See Autofilling form controls: the autocomplete attribute for the full list of attributes that can be used.
Enable pattern
attribute for input component.
You can now set the pattern
attribute on input fields using the component macros:
{{ input({
"label": {
"text": "Pattern example"
},
"id": "input-with-pattern",
"name": "pattern-example",
"pattern": "[0-9]*"
}) }}
Example of social media open graph cards for Twitter and Facebook
Examples for Twitter and Facebook have been added to the GitHub pages layout file and also to the HTML page template.
The open graph default image has also been added to the assets/logos
folder of the package.
:wrench: Fixes
Reorder the asset preconnect
and remove unneeded dns-prefetch
(Issue 434)
Header search icon padding has been altered due to the icon not being central for the desktop breakpoint.
Changelog
2.0.0 - 11 March 2019
:boom: Breaking changes
:new: New features
Summary list component - Use the summary list to summarise information, for example, a user’s responses at the end of a form.
If you are importing all styles with @import 'node_modules/nhsuk-frontend/packages/nhsuk';
you will automatically have access to the new component when you update. Alternatively if you are importing each of the individual components separately you will need to import the component with @import 'node_modules/nhsuk-frontend/packages/components/summary-list/summary-list';
:wrench: Fixes
Button component - A fix for the :focus state to display a 4px yellow border. (Issue 406)
JavaScript variable scope - Globally scoped variables were causing issues with JavaScript frameworks such as Angular, so they have been moved to be locally scoped within functions. However, this could be improved as we have to duplicate variables between the multiple functions, so its likely this is a temporary fix before refactoring our JavaScript to be class based. (PR 402), (Issue 398).
The JavaScript files will update automatically, when you update the nhsuk-frontend version and your application will work as normal.
Changelog
1.0.1 - 20 February 2019
:wrench: Fixes
:new: New features
<h3>
(PR 392)Changelog
1.0.0 - 5 February 2019
:tada: Official release of the NHS.UK frontend
:wrench: Fixes
Review date component - Removed the <time>
markup around the date because it doesn't have a datetime
attribute (which can't be automatically generated) and also we can't guarantee that the content will be a valid date/time string (PR 381)
Header component - Update of the Nunjucks template and documentation (PR 380)
Changelog
0.9.0 (Prerelease) - 31 January 2019
:new: New features
:wrench: Fixes
Changelog
0.8.0 (Prerelease) - 17 January 2019
:boom: Breaking changes
npm install
to update your packages and update the header HTML accordingly. (PR 342)Changelog
0.6.0 (Prerelease) - 18 December 2018
:boom: Breaking changes
npm JavaScript file path - The nhsuk.min.js
file has been moved from packages/
into dist/
if you are referencing
the compiled JavaScript file from the packages/
folder please update your projects.
Footer no longer includes a logo and the nunjucks macro arguments have been updated - if you are using the footer nunjucks macro then you need to update it. (PR 300)
:new: New features
See more about using ES6 modules in your project in the installing with npm - importing Javascript documentation.