-
Notifications
You must be signed in to change notification settings - Fork 107
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
ErrorSummary - keyboard focus issue #766
Comments
This works fine when running the nhsuk-frontend dev server. The reason it's not working in the service manual is because the Interestingly, in Firefox, without the JavaScript, this HTML does not result in the input field being focused. But it does in Chrome. Not sure what, if anything, we should be doing about this no-JS journey. Example here: https://codepen.io/andymantell/pen/ZEyEEgx |
After initialising the We are trying to think of the best way around this, potentially something like: #770 |
Moving this back into In Progress column. Needs a bit more work. @andymantell, does it still need the breaking change label? |
@sarawilcox No the breaking change got released already. The ErrorSummary is working as expected and not exhibiting this bug in the released version of nhsuk-frontend. The outstanding piece of work is that it hasn't been intialised in the service manual so it's not working on any of the examples. When this gets done - Refer to #770 and make sure that the error summary doesn't get focused on the page with all the demos on. Possibly could detect whether the demo was being rendered in an iframe, and if so don't enable the focusing behaviour. That would enable the full page demos to work as expected without causing problems on the index page. |
Hi @andymantell and @will-dyson-nhsd, do you know it this has been initialised in the service manual now? If not, what do we need to do about it? Thanks. |
@sarawilcox No it has not. We just need to initialise the JS and make sure to turn off the focusing as per #770. I'll try and get round to it at some point but can't guarantee when. |
This issue will be resolved when the next Service Manual release goes out, solution can be found here nhsuk/nhsuk-service-manual#1886. |
Bug Report
What is the issue?
Moving the keyboard focus to the input element that has the error while on Error Summary does not work on FireFox.
What steps are required to reproduce the issue?
Open up FireFox
Go to: https://service-manual.nhs.uk/design-system/components/error-summary
Scroll to the first example
Press 'Enter your full name'
See that focus does not move the cursor to the text input
What was the environment where this issue occurred?
Is there anything else you think would be useful in recreating the issue?
This functionality seems to work fine in any other browser.
Just for clarity here's a screenshot of the component where expected the functionality fails.
The keyboard focus on the error summary component linking to text input field works well in the gov uk frontend library in FireFox.
See: https://design-system.service.gov.uk/components/error-summary/
The text was updated successfully, but these errors were encountered: