Skip to content Skip to sidebar Skip to footer

Google Chrome Warning: Password Forms Should Have (optionally Hidden) Username Fields For Accessibility

When visiting the 'reset password' route of my single-page app and looking at the Chrome browser console, I am greeted with the following warning: [DOM] Password forms should have

Solution 1:

If your question is about getting rid of this warning, you may add a hidden text-box as mentioned in the warning message.

<inputtype="text" autocomplete="username" ng-hide="true">

Solution 2:

You should add text or email input type with autocomplete="username" attribute before all password inputs. It can be disabled or readonly.

<form method="post">
<inputtype="text" autocomplete="username" value="{{username}}">
or
<inputtype="email" autocomplete="username email" value="{{username}}">
<inputtype="password" name="password">
</form>

Post a Comment for "Google Chrome Warning: Password Forms Should Have (optionally Hidden) Username Fields For Accessibility"