[FormAnalyzer] Fix paperlesspost.com login form #711
+55
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reviewer: @shakyShane @GioSensation
Asana: https://app.asana.com/0/1200930669568058/1208734403743969/f
Description
paperlesspost.com login form is treated by autofill as
signup
because the button element with text "Do you have an account? Sign Up" get's marked as "likely a submit", causing the score to skyrocket to +20:The problem is that this condition of
el.type
is always'submit'
, unless type was explicitly set to something else.Checking
el.type
defaults to'submit'
when nothing is set on the button (as buttons are submit by default), although in think in this case we want to be explicitly checking the submit attribute withgetAttrinute('type')
instead, to know that a button was explicitly set usingsubmit
.Form signals (before)
Form signals (after)
Steps to test