question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default colour of the Disabled items text could be lighter.

See original GitHub issue

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 1

Tabs 2

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 https://github.com/twbs/bootstrap/pull/32473. This is probably not the right way of doing this. Sorry for that.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
patrickhlaukecommented, Dec 15, 2020

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”

3reactions
patrickhlaukecommented, Dec 14, 2020

while for disabled controls there’s no direct WCAG minimum contrast requirement, I’d still say that $gray-400 is just a little bit too uncomfortably low (1.5:1 against white). maybe $gray-500 #adb5bd (which gives 2:1 against white) may be a good compromise?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change text color for disabled input - Ignition
Normally the text colour of the button would be changed from black to grey when it is disabled.
Read more >
Is it possible to change default color of disabled text item ...
When using an appearance rule to make a text box on asp.net disabled it colors the text to a very light color. This...
Read more >
How to change the font colour of a disabled input text field? ...
Save this question. Show activity on this post. The colour of a disabled input text field created using material UI is light grey...
Read more >
default appearance of disabled items
ITEM1',ENABLED, PROPERTY_FALSE); and the text Forground color changed to light black or dark grey. So to answer your questions: --Is it possible ...
Read more >
How to change the font-color of disabled input using CSS
Approach: With adding basic CSS property we are able to change the font-color of a disabled input. The disabled input element is unusable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found