Skip to content

Conversation

@hober
Copy link
Member

@hober hober commented Apr 22, 2021

A long time ago we resolved to add an input-security : auto | none property that only applies to <input type=password>. Here's a PR that does this, though not very well.

I'll write a corresponding PR for HTML's Rendering section too.

@hober hober added css-ui-4 Current Work HTML Requires coordination with HTML people labels Apr 22, 2021
@hober hober requested a review from frivoal April 22, 2021 22:46
@hober hober self-assigned this Apr 22, 2021
@hober hober linked an issue Apr 22, 2021 that may be closed by this pull request
<pre class=anchors>
urlPrefix: https://html.spec.whatwg.org/multipage/; spec:HTML
text:password; type:attr-value; for:input/type; url: input.html#attr-input-type-password-keyword
</pre>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that the HTML markup is bad here and you can't reasonably use link-defaults, so this is fine for now. When you do the HTML PR, could you submit a fixup for these dfns as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

so that it cannot be read by the user.
</dl>

The exact mechanism by which user agents obscure the text in the control is undefined.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping it undefined is correct, but this could use an example showing off the dot-replacement used by current UAs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've provided an example in 3f5738a.

Name: input-security
Value: auto | none
Initial: ''input-security/auto''
Applies to: elements that accept sensitive text input, such as <{input/type/password|&lt;input type=password&gt;}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me vaguely uncomfortable. Is it indeed intended that this only works on password inputs, not on text inputs? If so, we should probably be clearer that this is host-language defined. Probably just say "Applies to: [=sensitive-text inputs=]" and define the term in the text as being host-language defined, and either specifying that in HTML only password inputs are sensitive-text inputs or linking to the spot you'll add in HTML that says the same.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me vaguely uncomfortable. Is it indeed intended that this only works on password inputs, not on text inputs?

That was the resolution. I'm not super enthused about this either—as I said in the original issue, it's sometimes desirable to obscure the text of other inputs, such as <input type=tel>. But I figure that's a discussion we can have in a followup issue.

If so, we should probably be clearer that this is host-language defined. Probably just say "Applies to: [=sensitive-text inputs=]" and define the term in the text as being host-language defined, and either specifying that in HTML only password inputs are sensitive-text inputs or linking to the spot you'll add in HTML that says the same.

Okay, I'll do something like this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've given this a go in 3f5738a. Please let me know what you think, @tabatkins!

@tabatkins
Copy link
Member

r+ from me after the adjustment, tho I'm not an editor so @frivoal or @tantek will have to give the final nod

Co-authored-by: Tab Atkins Jr. <jackalmage@gmail.com>
@frivoal frivoal merged commit f417d13 into w3c:main Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css-ui-4 Current Work HTML Requires coordination with HTML people

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[css-ui] Spec input-security property

3 participants