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

Allow ErrorSummary component to disable autofocus #1068

Closed
NickColley opened this issue Nov 19, 2018 · 4 comments
Closed

Allow ErrorSummary component to disable autofocus #1068

NickColley opened this issue Nov 19, 2018 · 4 comments
Assignees
Labels
error summary feature request User requests a new feature 🕔 hours A well understood issue which we expect to take less than a day to resolve.
Milestone

Comments

@NickColley
Copy link
Contributor

This may only be a need when using the ErrorSummary in the Design System website, but there might be cases where someone's application had different load events.

alphagov/govuk-design-system#643

@NickColley NickColley added the feature request User requests a new feature label Nov 19, 2018
@36degrees
Copy link
Contributor

We need to establish conventions for passing options to components to be able to pick this up.

@timpaul timpaul added 🕔 hours A well understood issue which we expect to take less than a day to resolve. Priority: low labels May 20, 2019
@NickColley
Copy link
Contributor Author

I got pretty far down the road to figuring this out here: #1238

We decided not to do it since Alex did not need this work to solve this problem in the end.

@vanitabarrett
Copy link
Contributor

This card is no longer dependant on the JavaScript work. We did something similar when we built the new notification banner component, and we should be able to do something similar for the error summary.

If we follow the same pattern as the notification banner, we will need to:

  • add a disableAutoFocus macro option which, when set to true, adds a data attribute to the HTML template
  • add some JavaScript logic which doesn't set the autofocus behaviour when the data attribute is present
  • add tests to check this functionality

@36degrees
Copy link
Contributor

Closed by #2494

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error summary feature request User requests a new feature 🕔 hours A well understood issue which we expect to take less than a day to resolve.
Projects
Development

No branches or pull requests

5 participants