-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing id property on p-menuitem #14131
Comments
Id should appear on 'li' tags, but does not. Check additional info on https://github.com/orgs/primefaces/discussions/298#discussioncomment-7377459 |
Hi, In the latest version of PrimeNG, id is appearing on li tags already. Could you please share a stackblitz example so we can identify the issue? |
Ok, seems there is some chaos in primeng versioning. I used the following line under the dependencies section in the package.json: Installing the app with this version setting (which would have to use 16.7.2 during a brand new npm install because of the ^ symbol), there is no any id attribute in li tag. Afterr setting a specific 16.7.2 value in the pacjage json, deleting all node_modules folder, and doing a fresh npm install, id attribute appeared in li tag. I went to npm site to check primeng version list, and saw the following: Is that mean "primeng": "^16.5.0" will not use 16.7.2 because 16.4.2 is the leatest? And based on that, what do you exctly means under latest? 16.4.2 or 16.7.2 ? |
I detected 16.7.2 version will not good for me, because dropdown and autocomplete inputs falling apart in my project (ok, at least I have id attributes in li items). I did a try with 16.4.2, but that version is a no-go either. Maybe you change button component behaviour and API after 16.4.2, and outlined, raised, etc behaviour settings now require separate input parameters (instead of the old good class list solution), and I had to rework my application, changing to this new button usage. And usage of the 16.4.2. would require to revert all button handling changes back in my side. (Hell no!). My next try was 16.6.0 version, and seems it will be the sweat spot... Dropdowns are working like in 16.5.0, and id attributes appeared on li items too. |
Discussed in https://github.com/orgs/primefaces/discussions/298
Originally posted by balagex October 24, 2023
After upgrading our application to Angular 16 ("@angular/core": "^16.2.9") and PrimeNg 16 ("primeng": "^16.5.0"), I realized, id attribute of the "a" tag (with menuitem role) disappeared!
In the product environment (with Angular 13 + primeNg 13) the HTML contains the id attribute:
In the 16th version, the id has gone:
All automated tests are failing, because those cannot click on a required menu item with specific id.
I did not found any way in the API documentation, how can I force the use if the id. If I set the automationId property of the related MenuItem class, then the "data-automationid" HTML attribute has appeared.
But we do not want to rewrite all automated tests, so please tell, how can I get those missing id attributes back.
The text was updated successfully, but these errors were encountered: