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

Details polyfill not available in any of the gov repos when npm install'ed #400

Closed
andymantell opened this issue Feb 8, 2017 · 5 comments · Fixed by alphagov/govuk_frontend_toolkit#426
Assignees

Comments

@andymantell
Copy link
Contributor

If you npm install the gov template, the toolkit and elements (govuk-elements-sass), the expectation is that you should have everything you need to use the gov styles. However, the element polyfill is missing since govuk-elements-sass only includes the sass.

Currently the polyfill is here in elements:

https://github.com/alphagov/govuk_elements/blob/master/public/javascripts/govuk/details.polyfill.js

I wonder whether it should perhaps live here instead:

https://github.com/alphagov/govuk_frontend_toolkit/tree/master/javascripts

In my situation, I would then be able to import the polyfill along with any other bits of toolkit JS I require.

The alternative option might be to publish the polyfill as it's own repository. If it's a good thing that has wider utility beyond gov, perhaps we could consider releasing it in it's own right. I'm not sure of the provenance of the code though - it looks like the original may have come from a blog post? That may complicate matters?

Another alternative might be to cast the net wider and use an open source details polyfill. If we could find one that was 95% good, and open PRs against it for any accessibility issues etc then that might be a good option rather than maintaining our own.

@robinwhittleton
Copy link
Contributor

@gemmaleigh can you remember why this was the only bit of JS not moved from elements to toolkit? I’ve forgotten the context.

@gemmaleigh
Copy link
Contributor

Hi @andymantell,

The details summary polyfill hasn't been moved to the govuk frontend toolkit, as it doesn't have tests to accompany it. There is also an issue that has been raised with it not working as expected when using JAWS with IE.

There is work being carried out by the accessibility team to evaluate the patterns in GOV.UK elements, before we move the polyfill to the govuk frontend toolkit - I'd like to be sure this is the recommended pattern for toggling hidden content.

@cfq - can you let us know if you have found any issues with the details summary pattern please?

@andymantell
Copy link
Contributor Author

Ah, thanks @gemmaleigh. I'll commit it into our application's repository for the time being.

@RobinKnipe
Copy link

@andymantell or @gemmaleigh - any news on if/when this might be resolved - or what I might use instead? Thanks.

@gemmaleigh
Copy link
Contributor

Hi @RobinKnipe apologies for the slow reply, we will be moving the details polyfill to the GOV.UK Frontend Toolkit.

Will update this issue once it is available via the govuk_frontend_toolkit.

36degrees added a commit that referenced this issue Oct 3, 2017
The details polyfill has been moved to Frontend Toolkit as part of v7.1.0. This is so that users of Elements and Frontend Toolkit can make use of it, as Elements only includes the Sass in its packages.

This was raised as part of #400
36degrees added a commit that referenced this issue Oct 3, 2017
The details polyfill has been moved to Frontend Toolkit as part of v7.1.0. This is so that users of Elements and Frontend Toolkit can make use of it, as Elements only includes the Sass in its packages.

This was raised as part of #400
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 a pull request may close this issue.

5 participants