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

Deprecate govuk-button--disabled - ability to style link buttons as disabled #2271

Closed
3 tasks done
36degrees opened this issue Jul 8, 2021 · 1 comment · Fixed by #3326
Closed
3 tasks done

Deprecate govuk-button--disabled - ability to style link buttons as disabled #2271

36degrees opened this issue Jul 8, 2021 · 1 comment · Fixed by #3326
Assignees
Labels
accessibility concern Bug, feature request or question about the accessibility of a portion of a product (not a WCAG fail) accessibility button
Milestone

Comments

@36degrees
Copy link
Contributor

36degrees commented Jul 8, 2021

What

Mark the govuk-button--disabled modifier class as deprecated, and communicate the change to users.

Why

Adding the --disabled modifier class to the button does not prevent users from interacting with it. Because of the way that our CSS is currently written, the disabled link button still has a change on focus state.

Because we're trying to remove states from an element that is still interactive and focusable, automated accessibility testing tools are likely to flag issues with it, as seen in #2127. We've also seen links with the disabled modifier flagged as failing color contrast requirements in Axe.

Further detail

At the same time, we could consider applying the hover and active states using the :enabled pseudo-class, rather than the current approach of 're-setting' the non-hover state for each button variant to avoid the change on hover. This would allow us to simplify the CSS, but would mean that buttons would no longer have a hover or active state in IE8.

Who needs to know about this

Designers, developers

Done when

  • disabled modifier class marked as deprecated
  • Deprecation communicated in release notes
  • Created a card to remove the modifier class in a breaking release
@vanitabarrett vanitabarrett changed the title Remove ability to style link buttons as disabled Deprecate govuk-button--disabled - ability to style link buttons as disabled Sep 3, 2021
@36degrees
Copy link
Contributor Author

This card covered both deprecation and removal – I've split the removal out in to #2681 and updated the description in this issue to only cover the initial deprecation.

@dav-idc dav-idc added the accessibility concern Bug, feature request or question about the accessibility of a portion of a product (not a WCAG fail) label Dec 2, 2022
@owenatgov owenatgov added this to the [NEXT] milestone Feb 20, 2023
@owenatgov owenatgov moved this to Sprint Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Feb 21, 2023
@querkmachine querkmachine moved this from Sprint Backlog 🏃🏼‍♀️ to Needs review 🔍 in GOV.UK Design System cycle board Feb 22, 2023
@querkmachine querkmachine self-assigned this Feb 22, 2023
@querkmachine querkmachine moved this from Needs review 🔍 to Ready to release 🚀 in GOV.UK Design System cycle board Feb 23, 2023
@querkmachine querkmachine moved this from Ready to release 🚀 to Done 🏁 in GOV.UK Design System cycle board Apr 20, 2023
jrmhaig added a commit to ministryofjustice/Claim-for-Crown-Court-Defence that referenced this issue Feb 28, 2024
See alphagov/govuk-frontend#2271

The only place where this is used is the download button for the provisional
assessment by date report on the MI page. The button is (and was) only
appearing as disabled but could still be pressed as it is a link and not a
button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility concern Bug, feature request or question about the accessibility of a portion of a product (not a WCAG fail) accessibility button
Development

Successfully merging a pull request may close this issue.

5 participants