ListBox: Duplicate "status" role span when using custom emptyMessage #16689
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Describe the bug
When using the PrimeNG ListBox component with a custom emptyMessage, two elements with the role="status" are added to the DOM when the list is empty. The first span contains the custom emptyMessage, and the second span contains the default message ("No selected item"). This results in both messages being "rendered" (not visible), which is incorrect behavior.
Environment
Windows 10, Angular/Primeng as below
Reproducer
https://stackblitz.com/edit/github-6ip3rq
Angular version
18.2.7
PrimeNG version
17.18.11
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.20.3
Browser(s)
Chrome 130
Steps to reproduce the behavior
Expected behavior
Only one with role="status" should be present, containing the custom emptyMessage. The default message should not appear if a custom emptyMessage is provided.
The text was updated successfully, but these errors were encountered: