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

Component: p-dropdown lost accessibility behavior #14543

Closed
PauloKoglin opened this issue Jan 12, 2024 · 3 comments
Closed

Component: p-dropdown lost accessibility behavior #14543

PauloKoglin opened this issue Jan 12, 2024 · 3 comments
Assignees
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Pending Review Issue or pull request is being reviewed by Core Team

Comments

@PauloKoglin
Copy link

PauloKoglin commented Jan 12, 2024

Describe the bug

Our Team is currently migrating the PrimeNG-Version in our project from 15.4.1 to 17.3.1.

Almost all our tests, which validate components that use the p-dropdown, started to fail, because the labels associated with the dropdown-components lost their accesible behavior.

After taking a look at the current p-dropdown code, I noticed that it was recently changed from an <input> element to a <span> (See images bellow). The problem is that <span> is not a form-control and therefore can't be associated with a <label>.

Version 15.4.1:
p-dropdown version 15.4.1

Version 17.3.1:
p-dropdown version 17.3.1

The angular-testing-library, which we use to build our tests, relies on accessibility standards, so, for example, when we try to query a p-dropdown by its <label>, the library doesn't find the element, cause it's semantically wrong.

Did anyone experienced this issue too?
Was this change intentional?

Environment

"@angular/animations": "17.0.8",
"@angular/common": "17.0.8",
"@angular/compiler": "17.0.8",
"@angular/core": "17.0.8",
"@angular/forms": "17.0.8",
"@angular/platform-browser": "17.0.8",
"@angular/platform-browser-dynamic": "17.0.8",
"@angular/router": "17.0.8",
"@swc/helpers": "~0.5.2",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primeng": "17.3.1",
"rxjs": "7.8.1",
"tslib": "^2.3.0",
"zone.js": "0.14.2"

Reproducer

https://stackblitz.com/edit/wcqer4

Angular version

17.0.8

PrimeNG version

17.3.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.10.0

Browser(s)

No response

Steps to reproduce the behavior

In the Stackblitz example:
Click on the label "Label for cities".

Expected behavior

After clicked on the label, the dropdown should be focused.

@PauloKoglin PauloKoglin added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 12, 2024
@mertsincan
Copy link
Member

mertsincan commented Jan 15, 2024

Hi,

We'll check it again and discuss it with our team. Thanks a lot for your report!
I added a milestone. We'll check it before the milestone is released.

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 15, 2024
@mertsincan mertsincan added this to the 17.4.0 milestone Jan 15, 2024
@cetincakiroglu cetincakiroglu self-assigned this Jan 23, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.4.0, 17.5.0 Jan 24, 2024
@cetincakiroglu cetincakiroglu added the Status: Discussion Issue or pull request needs to be discussed by Core Team label Jan 25, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.5.0, 17.6.0, 17.Future, 17.7.0 Feb 1, 2024
@cetincakiroglu cetincakiroglu modified the milestones: 17.7.0, 17.8.0 Feb 12, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

Since it would be a major and breaking change that replacing span with the input element. I am moving this issue to the 17.Future milestone as it will also affect other PrimeUI libraries. After completing the passthrough implementation, we will discuss it as a team and reconsider this enhancement.

@mehmetcetin01140
Copy link
Contributor

Hi,

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,

@github-project-automation github-project-automation bot moved this to Done in PrimeNG Dec 16, 2024
@mehmetcetin01140 mehmetcetin01140 removed this from the 19.x milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
None yet
Development

No branches or pull requests

4 participants