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

Remove support for disabled links #1075

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

paulrobertlloyd
Copy link
Contributor

@paulrobertlloyd paulrobertlloyd commented Nov 20, 2024

Description

Removes support for disabled links, which are not really a thing (or at least, shouldn’t be).

  • Removes support in button Nunjucks macro for adding aria-disabled="true" if element is a and disabled is true
  • Removes nhsuk-button--disabled modifier; buttons are styled as disabled if they have the disabled attribute applied
  • Uses the disabled boolean attribute (as opposed to disabled="disabled"

Checklist

@paulrobertlloyd paulrobertlloyd changed the title Remove disabled links Remove support for disabled links Nov 20, 2024
Copy link
Contributor

@frankieroberto frankieroberto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. 👍

A breaking change so not sure when it should get merged. @anandamaryon1?

@chrimesdev chrimesdev mentioned this pull request Nov 21, 2024
3 tasks
@anandamaryon1
Copy link
Collaborator

Note to self: update this (now incorrect) guidance on the button page:

Disabled buttons
Disabled buttons have poor contrast and can confuse some users. Only use them if user research shows it makes things easier for users to understand.
We have developed disabled versions of the 3 buttons but we haven't tested them yet. You can get the latest disabled button code in the NHS.UK frontend library in GitHub.

@frankieroberto
Copy link
Contributor

Note to self: update this (now incorrect) guidance on the button page:

Disabled buttons
Disabled buttons have poor contrast and can confuse some users. Only use them if user research shows it makes things easier for users to understand.
We have developed disabled versions of the 3 buttons but we haven't tested them yet. You can get the latest disabled button code in the NHS.UK frontend library in GitHub.

@anandamaryon1 I think this guidance would still stand (unless you have any more recent research?) but with the caveat that only disabled actual <button>s are supported, and links styled as disabled buttons aren’t supported? But possibly that’s such a weird use-case that it doesn’t need to be spelled out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants