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

Simplify button types to avoid unnecessary type attribute #1538

Merged
merged 2 commits into from
Aug 28, 2019

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Aug 28, 2019

The button element as an implicit type of submit if it it's not set, since this is what most people need this change reduces a bit of markup for people to copy and paste.

Markup before

<button type="submit" class="govuk-button" data-module="govuk-button">
  Save and continue
</button>

Markup After

<button class="govuk-button" data-module="govuk-button">
  Save and continue
</button>

@NickColley NickColley added this to the Next milestone Aug 28, 2019
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1538 August 28, 2019 10:27 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1538 August 28, 2019 10:55 Inactive
The button element as an implicit type of submit if it it's not set, since this is what most people need this change reduces a bit of markup for people to copy and paste.
@NickColley NickColley merged commit 94c9b9b into master Aug 28, 2019
@NickColley NickColley deleted the simplify-buttons-default branch August 28, 2019 11:32
@NickColley NickColley mentioned this pull request Sep 2, 2019
stephencdaly added a commit to alphagov/pay-selfservice that referenced this pull request Oct 7, 2019
govuk-frontend v3.1.0 removed the default type attribute on the button
element as it was unnecessary.

alphagov/govuk-frontend#1538

Some of our cypress tests used the type attribute in the selector, so remove
this to get them passing.
stephencdaly added a commit to alphagov/pay-products-ui that referenced this pull request Oct 7, 2019
govuk-frontend v3.1.0 removed the default type attribute on the button
element as it was unnecessary.

alphagov/govuk-frontend#1538

Some of our tests used the type attribute in the selector, so remove
this to get them passing.
stephencdaly added a commit to alphagov/pay-selfservice that referenced this pull request Oct 9, 2019
govuk-frontend v3.1.0 removed the default type attribute on the button
element as it was unnecessary.

alphagov/govuk-frontend#1538

Some of our cypress tests used the type attribute in the selector, so remove
this to get them passing.
@timpaul timpaul added the button label Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants