@@ -390,7 +390,7 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
390
390
- <{input}> elements with `type="range"`
391
391
- <{input}> elements with `type="checkbox" switch`
392
392
393
- ## Styling Parts for Text Fields: the ''::field-text'' and ''::clear-icon'' pseudo-elements ## {#field-pseudos}
393
+ ## Styling Parts for Text Fields: the ''::placeholder'' , '':: field-text'', ''::reveal-icon'' , and ''::clear-icon'' pseudo-elements ## {#field-pseudos}
394
394
395
395
<dl export>
396
396
<dt> <dfn>::placeholder</dfn>
@@ -403,6 +403,32 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
403
403
The ''::field-text'' pseudo-element represents
404
404
the portion of the <{input}> that contains the editable text.
405
405
406
+ <dt> <dfn>::reveal-icon</dfn>
407
+ <dd>
408
+ The ''::reveal-icon'' pseudo-element represents
409
+ the portion of the <{input}> that allows the user to
410
+ temporarily disable obscuring of [=sensitive text input=]
411
+ when clicked if provided by the user agent.
412
+
413
+ User agents providing ''::reveal-icon'' may choose to
414
+ remove it in some circumstances to help protect [=sensitive text input=]
415
+ from being revealed unintentionally.
416
+
417
+ <div class=note>
418
+ Example mitigations to avoid unintentionally revealing [=sensitive text input=] :
419
+ <ul>
420
+ <li> If focus moves away from the field, remove the ''::reveal-icon'' .</li>
421
+ <li> If script modifies field content, remove the ''::reveal-icon'' .</li>
422
+ <li> If the ''::reveal-icon'' is removed due to either of the above,
423
+ the user must delete the contents of the field to make the
424
+ ''::reveal-icon'' appear again. This behavior prevents someone
425
+ from making a minor change to field content to expose the
426
+ ''::reveal-icon'' on an unattended device.</li>
427
+ <li> If the field is filled by a user agent autofill feature, remove
428
+ the ''::reveal-icon'' .</li>
429
+ </ul>
430
+ </div>
431
+
406
432
<dt> <dfn>::clear-icon</dfn>
407
433
<dd>
408
434
The ''::clear-icon'' pseudo-element represents
@@ -413,12 +439,10 @@ spec:css-forms-1; type:value; for:/; text:::placeholder
413
439
With ''appearance: textfield'' , the user agent must not generate this part.
414
440
</dl>
415
441
416
- ''::field-text'' and ''::clear-icon'' must be siblings.
442
+ ''::field-text'' , ''::reveal-icon'' , and ''::clear-icon'' must be siblings.
417
443
418
444
ISSUE: Collect parts used by autofill.
419
445
420
- ISSUE(11845): Define something for the password visibility toggle for user agents implementing it?
421
-
422
446
ISSUE(11844): Define how `::placeholder` interacts with `::field-text`.
423
447
424
448
## Styling Parts for textareas: the ''::placeholder'' and ''::field-text'' pseudo-elements ## {#textarea-pseudos}
@@ -1045,6 +1069,7 @@ select::picker-icon {
1045
1069
<li>Removed "Appendix B: Explorations" with obsolete ideas.</li>
1046
1070
<li>Added "slider-" prefix to slider pseudo-elements.</li>
1047
1071
<li>Moved 'field-sizing' and 'input-security' properties from css-ui-4.</li>
1072
+ <li>Added the '' ::reveal-icon'' pseudo-element.</li>
1048
1073
</ul>
1049
1074
1050
1075
<h2 class=no-num id=privacy>Privacy Considerations</h2>
0 commit comments