question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Password: Html validation errors (aria-readonly, role)

See original GitHub issue

Describe 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:

  1. “Attribute role not allowed on element input at this point.”
  2. “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:

  1. Go to e.g. ‘http://localhost:8080/primefaces-test/
  2. Open e.g. Nu Html Checker
  3. 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:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mellowarecommented, Dec 16, 2020

OK I fixed it master to leave aria-disabled.

0reactions
mellowarecommented, Dec 16, 2020

AHh OK let me make disabled OK.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found