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

Update GOV.UK Frontend and enable error summary #643

Merged
merged 2 commits into from
Nov 19, 2018
Merged

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Nov 19, 2018

Overrides the init function to avoid the autofocus behaviour, we should remove this when the component has this option itself.

Override the init function to avoid the autofocus behaviour, we should remove this when the component has this option itself.
@NickColley NickColley changed the title Add error summary Update GOV.UK Frontend and enable error summary Nov 19, 2018
@govuk-design-system-ci
Copy link
Collaborator

You can preview this change here:

Built with commit f622066

https://deploy-preview-643--govuk-design-system-preview.netlify.com

Copy link
Contributor

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Nick! 👍

@NickColley NickColley merged commit f3ca267 into master Nov 19, 2018
@NickColley NickColley deleted the add-error-summary branch November 19, 2018 16:31
36degrees added a commit to alphagov/govuk-frontend that referenced this pull request Jan 5, 2022
Make it possible to disable the autofocus behaviour on the error summary by setting a data attribute on the module (or by setting disableAutoFocus if using the Nunjucks macro). This is consistent with the approach currently used for the notifcation banner.

The main use case for this is on the Design System, where the auto focus is problematic for the examples provided within the guidance – it causes the browser to scroll down to the first example on the page. At the minute, we are working around this by 'monkey-patching' the init method to remove the call to $module.focus [1].

[1]: alphagov/govuk-design-system#643
36degrees added a commit to alphagov/govuk-frontend that referenced this pull request Jan 7, 2022
Make it possible to disable the autofocus behaviour on the error summary by setting a data attribute on the module (or by setting disableAutoFocus if using the Nunjucks macro). This is consistent with the approach currently used for the notifcation banner.

The main use case for this is on the Design System, where the auto focus is problematic for the examples provided within the guidance – it causes the browser to scroll down to the first example on the page. At the minute, we are working around this by 'monkey-patching' the init method to remove the call to $module.focus [1].

[1]: alphagov/govuk-design-system#643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants