Closed sKopheK closed 7 years ago
I haven't run the tool over it but at a glance:
The role
attribute is part of ARIA and the values it can take are limited. There is (currently) no such role as password
.
Even if password
did exist you'd still likely get a warning because the native semantics are unambiguous. In other words <input type="password"
is quite enough to say "this is a password field", the role="password"
would be redundant. Read ARIA adds nothing to default semantics of most HTML elements and note:
In the majority of cases setting an ARIA role and/or aria-* attribute that matches the default implicit ARIA semantics is unnecessary and not recommended as these properties are already set by the browser.
aria-valuenow
is only used in the roles: progressbar
, scrollbar
, slider
, spinbutton
Thanks for the reply, Rick, I'll use the advices to improve my code.
Hello, got this warning about invalid ARIA attributes in my markup. What is exactly wrong in this code, e.g.:
<input autocomplete="false" class="k-password k-input" data-val="true" data-val-regex="Password must be between 6 and 255 characters" data-val-regex-pattern=".{6,255}" data-val-required="'Choose password' should not be empty." id="Password" name="Password" type="password" data-role="password" role="password" aria-valuenow="" aria-disabled="false" aria-readonly="false">
?