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

Include the shim-links-with-button-role.js script from the frontend toolkit #283

Merged
merged 2 commits into from
Aug 19, 2016

Conversation

gemmaleigh
Copy link
Contributor

@gemmaleigh gemmaleigh commented Aug 11, 2016

Include a script from the govuk frontend toolkit to shim anchors with
role="button" to be 'clicked' via the space key.

For context, here is the PR adding this script to the govuk_frontend_toolkit.
alphagov/govuk_frontend_toolkit#310

@gemmaleigh
Copy link
Contributor Author

gemmaleigh commented Aug 15, 2016

@paulmsmith
Copy link

I can look at that tomorrow or Wednesday.

Links styled to look like buttons lack button behaviour. This script will allow them to be triggered with a space key after they’ve been focused, to match standard buttons.

By default, this behaviour will only be applied to links with a role of button.
By default, this behaviour will only be applied to links with a role of button.
<a class="button" role="button">A button</a>

This script will allow them to be triggered with a space key after they’ve been focused, to match standard buttons.
@gemmaleigh gemmaleigh force-pushed the shim-links-with-aria-role-button branch from cf184ac to 2a775df Compare August 19, 2016 11:36
@gemmaleigh gemmaleigh changed the title Include the anchor buttons script from the frontend toolkit Include the shim-links-with-button-role.js script from the frontend toolkit Aug 19, 2016
@robinwhittleton robinwhittleton merged commit 32553af into master Aug 19, 2016
@robinwhittleton robinwhittleton deleted the shim-links-with-aria-role-button branch August 19, 2016 12:12
@paulmsmith
Copy link

+1

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 this pull request may close these issues.

3 participants