devtools-tips icon indicating copy to clipboard operation
devtools-tips copied to clipboard

Visual distinction between a placeholder & input text

Open pankajparashar opened this issue 2 years ago • 2 comments

With placeholder: image

With text: image

Issue is here, https://github.com/captainbrosset/devtools-tips/blob/main/src/assets/style.css#L249

Do you think the placeholder style should be removed?

pankajparashar avatar Nov 20 '23 07:11 pankajparashar

The difficulty is that the default placeholder color doesn't offer enough contrast with the background color. But I agree this is a bug and we should find a way to improve this.

Ideally, there should be a visible label too, and not just a placeholder, for accessibility reasons. So maybe the solution is to find a nice way to display a label next to the field, and get rid of the placeholder.

captainbrosset avatar Nov 20 '23 08:11 captainbrosset

Yes, we should definitely have a label. Meanwhile, rgb(82 82 82) does offer sufficient contrast ratio to meet WCAG guidelines. I used the color suggested by DevTools to fix the contrast ratio.

image

pankajparashar avatar Nov 20 '23 14:11 pankajparashar