Add polyfill for HTML5 <details> element

The details element is fairly new. It doesn’t work in all browsers,
and isn’t keyboard/screenreader accessible even in some new browsers.

This commit adds the Polyfill script from GOV.UK elements[1] which
polyfills these features for browsers that don’t support them.

1. http://govuk-elements.herokuapp.com/typography/#typography-hidden-text
This commit is contained in:
Chris Hill-Scott
2016-05-17 14:46:34 +01:00
parent c6ab4d2c94
commit 2ba801ff73
3 changed files with 236 additions and 33 deletions

View File

@@ -53,6 +53,7 @@ gulp.task('javascripts', () => gulp
.src([
paths.toolkit + 'javascripts/govuk/modules.js',
paths.toolkit + 'javascripts/govuk/selection-buttons.js',
paths.src + 'javascripts/detailsPolyfill.js',
paths.src + 'javascripts/apiKey.js',
paths.src + 'javascripts/autofocus.js',
paths.src + 'javascripts/highlightTags.js',