You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Missing id or name attribute
Despite specifying a <label for=FORM_ELEMENT> and an id with the same name, the browser console throws an error stating that a form field should have an id or name attribute. This could potentially affect form submission and autofill functionality.
Environment
Development, staging, and production environments
Reproducer
No response
Angular version
17.3.1
PrimeNG version
17.10.0
Build / Runtime
Angular CLI App
Language
ALL
Node version (for AoT issues node --version)
20.11.0
Browser(s)
No response
Steps to reproduce the behavior
Use the dropdown or multi-select component in the PrimeNG UI library.
Specify a <label> with a for attribute matching the id of the form field.
Ensure that the id attribute is present in the form field.
Observe the browser console for the error message mentioned.
Expected behavior
The components should have both id and name attributes to ensure proper form functionality and accessibility.
The text was updated successfully, but these errors were encountered:
So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?
Thanks a lot for your understanding!
Best Regards,
Describe the bug
Missing
id
orname
attributeDespite specifying a
<label for=FORM_ELEMENT>
and anid
with the samename
, the browser console throws an error stating that a form field should have an id or name attribute. This could potentially affect form submission and autofill functionality.Environment
Development, staging, and production environments
Reproducer
No response
Angular version
17.3.1
PrimeNG version
17.10.0
Build / Runtime
Angular CLI App
Language
ALL
Node version (for AoT issues node --version)
20.11.0
Browser(s)
No response
Steps to reproduce the behavior
<label>
with a for attribute matching the id of the form field.Expected behavior
The components should have both
id
andname
attributes to ensure proper form functionality and accessibility.The text was updated successfully, but these errors were encountered: