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.

Fix disabled-text scss styling to meet a11y standards

See original GitHub issue

disabled-text usage should be replaced to meet accessibility contrast requirements

Replace disabled text usage to new shared constant:

  • badge
  • datepicker
  • form field
  • input
  • select
  • stepper
  • tabs

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jelbourncommented, Jul 2, 2021

Also, WCAG states the following:

Text or images of text that are part of an inactive user interface component, that are pure decoration, that are not visible to anyone, or that are part of a picture that contains significant other visual content, have no contrast requirement.

So TL;DR disabled controls don’t actually have a text contrast requirement. Personally I think this is not the best, but that’s the standard today. If we can confirm that all of these cases are genuinely for inactive controls, that lowers the priority in my estimation (to P4).

@Splaktar I don’t think this can be fully fixed in MDC, though, since we don’t have (or plan to have) MDC versions of badge, datepicker, or stepper.

1reaction
josephperrottcommented, May 26, 2020

I discovered the issue while performing aXe tests across the codebase. The disabled-text check failed in its usages here.

If I remember correctly, we determined that for many of these we would need to consult with the Material team to determine if it was a spec issue or something in our implementation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS Techniques for WCAG 2.0 - W3C
This Web page lists CSS Techniques from Techniques for WCAG 2.0: Techniques ... When the style sheets are not applied, the text appears...
Read more >
disabled - CSS: Cascading Style Sheets - MDN Web Docs
The :disabled CSS pseudo-class represents any disabled element. An element is disabled if it can't be activated (selected, clicked on, typed ...
Read more >
Making Disabled Buttons More Inclusive - CSS-Tricks
Preventing people from doing an invalid or unavailable action is the most common reason we might reach for a disabled button.
Read more >
Buttons - A11Y Style Guide
In order to meet the guidelines at the stricter Level AAA, the contrast ratio must be at least 7:1 (or 4.5:1 for large...
Read more >
Accessibility and usability considerations for disabling buttons ...
Broadly speaking, it's best not to disable buttons or inputs. Instead we can allow data entry and provide helpful error text (either inline ......
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