Re: [csswg-drafts] [css-forms-1] Password visibility toggle (#11845)

> The only alternative I can think of is ::reveal-button? Because unlike ::picker-icon this is actually a specific click target to do a thing? Whereas at least in select the icon is just an indicator.

This line of thought makes sense to me, though if we go with `::reveal-button`, I think we should also rename `::clear-icon` to `::clear-button` for consistency.

In general, I like the idea of naming things based on what purpose they fulfill, rather than what they look like. An author could choose to style the reveal toggle to look more like a typical button by applying a border and background, for example.

[Merriam-Webster](https://www.merriam-webster.com/dictionary/icon) defines "icon" as "a graphic symbol on a computer display screen that represents an app, an object (such as a file), or a function (such as the command to save)", without any reference to clickability.

So, new proposal:
* In general, use "icon" to name graphical indicators and "button" to name clickable things
* Name the password reveal toggle `::reveal-button`
* Rename `::clear-icon` to `::clear-button`


-- 
GitHub Notification of comment by kbabbitt
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11845#issuecomment-2997244887 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 23 June 2025 17:12:08 UTC