Password: Html validation errors (aria-readonly, role)
See original GitHub issueDescribe the defect I’m currently working on a project which was recently tested for valid html code. Among other components, we use the Primefaces password component which causes some errors when validating the html which is displayed in the browser. I have also tested it via primefaces-test for the 9.0-SNAPSHOT version, but the errors still exists.
The password field in the resulting html shows up with both “role=‘textbox’” and “aria-readonly=‘false’” attributes, which both cause error messages. Both of these attributes are set in the “core.js” -> “skinInput()” method.
Validation errors:
- “Attribute role not allowed on element input at this point.”
- “Attribute aria-readonly not allowed on element input at this point.”
Environment:
- PF Version: 9.0-SNAPSHOT
- JSF + version: Mojarra 2.3.14
- Affected browsers: ALL
To Reproduce Steps to reproduce the behavior:
- Go to e.g. ‘http://localhost:8080/primefaces-test/’
- Open e.g. Nu Html Checker
- See error
Example XHTML Input
<p:password id="password-test" value="test"/>
Result
<input id="frmTest:password-test" name="frmTest:password-test" type="password" class="ui-inputfield …i-widget ui-state-default ui-corner-all" role="textbox" aria-disabled="false" aria-readonly="false">
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
aria-invalid - Accessibility - MDN Web Docs
HTML has native form validation. When a user submits a form with a control containing errors, the first form control with an invalid...
Read more >aria-readonly on input generates false positive #1199 - GitHub
An input type="checkbox" with aria-readonly="true" generates a false ... if aria-readonly were to not raise a validation error on <input ...
Read more >ARIA21: Using Aria-Invalid to Indicate An Error Field
This technique demonstrates how aria-invalid may be employed to specifically identify fields that have failed validation. Its use is most suitable when:.
Read more >Code validation in W3C validator getting failed due to aria ...
Among the two controls, the issue is only with the input[type="password"] control. How to handle this HTML code validation error?
Read more >How To Create a Password Validation Form - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK I fixed it master to leave aria-disabled.
AHh OK let me make disabled OK.