Skip to content

Commit

Permalink
Merge pull request #237 from alphagov/shim-links-with-aria-role-button
Browse files Browse the repository at this point in the history
Include the shim-links-with-button-role.js script from the govuk_frontend_toolkit
  • Loading branch information
tvararu authored Aug 22, 2016
2 parents be9e166 + 42be774 commit efce8ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ $(document).ready(function () {
var $blockLabels = $(".block-label input[type='radio'], .block-label input[type='checkbox']")
new GOVUK.SelectionButtons($blockLabels) // eslint-disable-line

// Use GOV.UK shim-links-with-button-role.js to trigger a link styled to look like a button,
// with role="button" when the space key is pressed.
GOVUK.shimLinksWithButtonRole.init()

// Show and hide toggled content
// Where .block-label uses the data-target attribute
var toggleContent = new ShowHideContent()
Expand Down
3 changes: 2 additions & 1 deletion app/views/includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<script src="/public/javascripts/details.polyfill.js"></script>
<script src="/public/javascripts/jquery-1.11.3.js"></script>
<script src="/public/javascripts/govuk/selection-buttons.js"></script>
<script src="/public/javascripts/application.js"></script>
<script src="/public/javascripts/govuk/shim-links-with-button-role.js"></script>
<script src="/public/javascripts/application.js"></script>

0 comments on commit efce8ec

Please sign in to comment.