-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Default colour of the Disabled items text could be lighter. #32474
Comments
while for disabled controls there's no direct WCAG minimum contrast requirement, I'd still say that |
Yes, you are right! In fact after sending this I tried with |
@patrickhlauke I’d be okay with that I think! Depends on @twbs/css-review feedback on lowering contrast ratios. |
I'd be against this — but as @patrickhlauke mentionned, disabled things are still an exception when it comes to contrasts, sadly! Since it's very easy to customize, your call. |
@ffoodd I think it is easy for people to understand between active and disabled items if they are well distinguished. If you don't mind I would like to know why you don't like the idea. Sorry for asking. |
it's the tension between signalling visually that something is disabled, while also actually allowing users to see it properly. even somebody who may have low vision / difficulty in distinguishing colour well may want to be able to see that yes, there's something there, just that it's currently disabled - they can get information from that, the same way users with good vision can. but when contrast is too low, they'll struggle. this is why WCAG defines baseline color contrast ratios that we try to follow...but as it explicitly exempts disabled controls, the ratios don't apply... so it's a case of weighing up "we're allowed to do it" vs "how far should we go to still make it usable/useful regardless" |
IMO, if your disabled control is so useless that you don't care it's barely invisible, why not simply drop it? This is a gross way to highlight the issue, but some patterns in the wild are really difficult: say a submit button is disabled until something happens and has low contrasts, it could be missed — then its state update could be missed too, and your user gets stuck. So yeah, WCAG does not ask for disabled things to provide sufficient contrast, yet it can (and probably will) be an issue. |
FWIW, our disabled buttons don't have enough contrast either but a lot of A11Y tools won't complain about that since they can't deal with opacity. Wild idea: would it be better/make sense to add an |
|
Opened #32785 to tackle this. |
Hi,
Can we make the default text colour of Disabled Link (Dropdown and Tab items) bit more lighter?
Currently this is pretty close to that of Active item's text colour.
My suggestion is instead of
$gray-600
(#6c757d
), we may use$gray-400
(#ced4da
) for.disabled
class. (src/scss/_variables.scss
).Please see the difference in the following screenshots
Dropdown

Tabs

Also, adding the
.disabled
class to links might also use a different colour, but when the click is enabled (but the default behaviour is prevented), we could use the same blue colour.However, if the click is not enabled, we might use a lighter colour as well telling that link is available but not clickable. May be we can use the same
$gray-400
for this as well!An use case maybe a role based restrictions.
UPDATE
I tried to create a Pull Request instantly at #32473. This is probably not the right way of doing this. Sorry for that.
The text was updated successfully, but these errors were encountered: