-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add the keyboard shim for link buttons #3027
Conversation
b640614
to
546c9ba
Compare
546c9ba
to
4c8f9ef
Compare
4c8f9ef
to
b955b29
Compare
b955b29
to
54a89b4
Compare
54a89b4
to
b2b62a4
Compare
b2b62a4
to
28d408e
Compare
68cd824
to
03f0cba
Compare
03f0cba
to
dc9d03b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me 👍
Only small nitpick would be to remove the extra line in the change log - https://github.com/alphagov/govuk_publishing_components/pull/3027/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR13
dc9d03b
to
5f9092e
Compare
Good spot and removed ✔️ |
What
Add the keyboard shim for link buttons
Why
As links styled as buttons have the button role, some assistive technology announces 'To activate press space bar'. Links cannot usually be triggered with the space bar, and so we have to shim this behaviour – see alphagov/govuk_elements#272 for more context.
Examples
Button
https://components-gem-pr-3027.herokuapp.com/component-guide/button/default/preview
Link button
https://components-gem-pr-3027.herokuapp.com/component-guide/button#link_button
Button (with data attributes)
https://components-gem-pr-3027.herokuapp.com/component-guide/button/with_data_attributes/preview
Link button (with data attributes)
Link button in application (with data attributes)
https://www.integration.publishing.service.gov.uk/overseas-passports (integration) or http://127.0.0.1:3005/overseas-passports (development)