Menu: label as HTML (escape false) is rendered in aria-label property of the menuitem #15467
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
When the label of a MenuItem is defined as HTML string, the same html is currently used as the value for the
aria-label
property.Currently,
MenuItem
does not have an explicitariaLabel
property, but it's implicitely filled with[attr.aria-label]="label(item.label)"
which in the case of html content with the use ofescape: false
does not provide the intended markups, and makes testing difficult to query the element.Environment
Windows
Reproducer
No response
Angular version
17.3.0
PrimeNG version
17.13.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.11.0
Browser(s)
Chrome
Steps to reproduce the behavior
The rendered HTML is something like:
Expected behavior
The aria-label property of the role menuitem element should be a plain text.
The text was updated successfully, but these errors were encountered: