-
Notifications
You must be signed in to change notification settings - Fork 22
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 draggable false to button markup and validation #224
Conversation
b063d76
to
390ba29
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.
Looks good, a few small comments and questions
@@ -224,7 +224,7 @@ def insert_strong_inside_p(body, parser = Govspeak::Document) | |||
text = text.strip | |||
href = href.strip | |||
|
|||
%(\n<a role="button" class="#{button_classes}" href="#{href}" #{data_attribute}>#{text}</a>\n) | |||
%(\n<a role="button" draggable="false" class="#{button_classes}" href="#{href}" #{data_attribute}>#{text}</a>\n) |
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.
We still need draggable="false"
here right?
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.
After a very quick test, we indeed do.
390ba29
to
ad62d2c
Compare
This is in response to a change to button markup in the components gem which wasn't reflected in govspeak. This caused the govspeak validator to assume all buttons failed as the in-app markup was including `draggable="false"` whilst sanitised govspeak wasn't.
ad62d2c
to
3198495
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.
Looks great, thanks Owen! 👍
What
Adds
draggable="false"
to the govspeak button extension output.Why
This is in response to a change to button markup in the components gem (alphagov/govuk_publishing_components#2448) which wasn't reflected in govspeak. This caused the govspeak validator to assume all buttons failed as the in-app markup was including
draggable="false"
whilst sanitised govspeak wasn't.Zendesk ticket which prompted this
No visual changes