Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(autocomplete-appropriate): pass for autocomplete=username and type=email #2896

Merged

Conversation

clottman
Copy link
Contributor

@clottman clottman commented Apr 27, 2021

Per issue #2727, allow the autocomplete-appropriate rule to pass for an input like <input type='email' autocomplete='username' >

Also fixes spacing in the name of a test for autocomplete-valid.

Closes issue: #2727

@clottman clottman requested a review from a team as a code owner April 27, 2021 18:51
@CLAassistant
Copy link

CLAassistant commented Apr 27, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

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

Thanks for the pr! Added a suggestion that should hopefully help fix the tests.

@@ -12,6 +12,7 @@ function autocompleteAppropriateEvaluate(node, options, virtualNode) {
const allowedTypesMap = {
bday: ['text', 'search', 'date'],
email: ['text', 'search', 'email'],
username: ['email'],
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe to fix the test we'll need this to also include text and probably search. Otherwise it's restricted to just type=email.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! That makes sense, thanks for the hint. :)

@straker straker changed the title #2727 inputs with autocomplete=username and type=email should pass autocomplete-appropriate fix(autocomplete-appropriate): pass for autocomplete=username and type=email Apr 28, 2021
@straker
Copy link
Contributor

straker commented Apr 28, 2021

Sorry one last thing. Could you add an integration test for the new combination?

@clottman clottman requested a review from straker April 28, 2021 15:43
Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

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

Thanks!

@straker
Copy link
Contributor

straker commented Apr 28, 2021

Reviewed for security

@WilcoFiers WilcoFiers merged commit 43394bc into dequelabs:develop Apr 28, 2021
straker pushed a commit that referenced this pull request May 18, 2021
…e=email (#2896)

* allow type=email autocomplete=username

* also add text and search

* add integration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants