Skip to content
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

Closed
csongebalazs opened this issue Nov 15, 2023 · 4 comments
Closed

missing id property on p-menuitem #14131

csongebalazs opened this issue Nov 15, 2023 · 4 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@csongebalazs
Copy link

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:
kép

In the 16th version, the id has gone:
kép

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.

@csongebalazs
Copy link
Author

csongebalazs commented Nov 15, 2023

Id should appear on 'li' tags, but does not. Check additional info on https://github.com/orgs/primefaces/discussions/298#discussioncomment-7377459

@onursenture onursenture transferred this issue from primefaces/community Nov 16, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 16, 2023
@cetincakiroglu
Copy link
Contributor

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?

@csongebalazs
Copy link
Author

Ok, seems there is some chaos in primeng versioning.

I used the following line under the dependencies section in the package.json:
kép

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:
kép

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 ?

@csongebalazs
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants