-
Notifications
You must be signed in to change notification settings - Fork 109
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
Details component announces its default and expanded state 1 time but not subsequent times using NVDA #754
Comments
I can reproduce this, on NVDA 2020.4 and 2021.1 in Firefox. Will investigate... |
It appears that the JS polyfill that we are using and applying regardless of the presence of native details/summary support is actually making it worse in Firefox. When I disable this JS, Firefox starts behaving properly. Speaking to @tomdoughty - this polyfill was put in at a time when even browsers that did support it, didn't support it well, and screenreaders were not announcing the state correctly. However, it appears time has moved on, and support for the native element and assistive tech is better than it was. I feel therefore that we should only initialise the polyfill when support for the native element is not present. This is backed up by this commit from govuk-frontend: At the moment, we do still need the polyfill for IE11 however so we cannot yet remove it entirely. |
This fixes an issue with Firefox / NVDA not announcing the open state of the element. Fixes #754 See also alphagov/govuk-frontend@f5cfa5f
Weirdly I seem to no longer be able to reproduce this issue! I could do this morning, but NVDA has updated itself since and now I can't get back to a broken state. Nevertheless, I think the fix in the attached pull request is sensible anyway. |
Bug Report
What is the issue?
When using the details component with NVDA, expanding the summary text announces the 'expanded' state and when closing it, the 'collapsed' state is announced. However, subsequent opening and closing does not get announced.
What steps are required to reproduce the issue?
What was the environment where this issue occurred?
Is there anything else you think would be useful in recreating the issue?
No
The text was updated successfully, but these errors were encountered: