mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 10:48:26 -04:00
Style cancel link and make it keyboard navigable
So that it looks and behaves like a normal link.
This commit is contained in:
@@ -43,7 +43,9 @@
|
|||||||
this.addCancelButton = function(state) {
|
this.addCancelButton = function(state) {
|
||||||
let $cancel = $('<a></a>')
|
let $cancel = $('<a></a>')
|
||||||
.html('Cancel')
|
.html('Cancel')
|
||||||
.click((event) => {
|
.attr('class', 'page-footer-js-cancel')
|
||||||
|
.attr('tabindex', '0')
|
||||||
|
.on('click keydown', (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// clear existing data
|
// clear existing data
|
||||||
state.$el.find('input:radio').prop('checked', false);
|
state.$el.find('input:radio').prop('checked', false);
|
||||||
|
|||||||
@@ -86,3 +86,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-footer-js-cancel {
|
||||||
|
|
||||||
|
text-decoration: underline;
|
||||||
|
color: $govuk-blue;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $link-hover-colour;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus,
|
||||||
|
&:active, {
|
||||||
|
background: $yellow;
|
||||||
|
color: $govuk-blue;
|
||||||
|
outline: 3px solid $yellow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user