Hacker News new | ask | show | jobs
by kmoser 868 days ago
Not sure I would make the "disabled" buttons stand out more brightly than a regular button. In fact I would swap the colors of those buttons, or maybe make the disabled button greyed out.
3 comments

I limited myself to black and white when creating the style-sheet, but maybe I should indeed add some kind of indicator for the "disabled" button, such as hatchings.

edit: hatchings make the inner text unreadable, I'll play around with opacity and dotted lines, thank you to the users who proposed them.

edit 2: went with dashed lines and published a new version. It even shaves off a couple of bytes off the minimized version :D

Hmm I think the dashed lines still don't say to me "disabled" unless you told me. It looks more like a secondary button (eg "Go back" or "Cancel"). I really do think the use of reduced opacity would make sense here :)
this could be a rare but very practical usecase for strike-through text
Wow, I love that!
Could border-style dashed/dotted work?
Opacity maybe would help here.
Hatching seems an excellent idea.
Agreed. One thing that a lot of people miss when attempting to comply with WCAG contrast guidelines is that disabled controls are specifically exempt.

With good reason, IMO — too much contrast and it’s not clear that an element is disabled.

And yet younguns with good eyes and no color blindness will be able to read the text, and others won’t.

If you let a designer put grey on grey once, they’ll do it 10,000,000 times.

The buttons also need a hover/focus state, easy win for accessibility there
definitely - could use outline property, transforms/thickened borders or border radius animations if it's Imperative to keep things black and white
Agreed, maybe even just invert it to white-on-black on hover.