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

p-overlayPanel: aria-expanded and aria-controls not added to trigger element #14621

Closed
MaSch0212 opened this issue Jan 24, 2024 · 2 comments
Closed
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@MaSch0212
Copy link
Contributor

Describe the bug

When opening a p-overlayPanel element using a button, the aria-expanded and aria-controls attributes are not set to the button. If I understand the documentation correctly, this should happen.

OverlayPanel adds aria-expanded state attribute and aria-controls to the trigger so that the relation between the trigger and the popup is defined.

I can reproduce the same issue with the p-menu in popup mode. I guess it might be the same issue.

Environment

I can reproduce this on primeng.org.

Reproducer

https://primeng.org/overlaypanel

Angular version

17.0.2

PrimeNG version

17.3.3

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.3.0

Browser(s)

Chrome 120

Steps to reproduce the behavior

  1. Go to https://primeng.org/overlaypanel
  2. In the basic example click the Show button
  3. Check in DevTools if the aria attributes are added to that button
    image

Expected behavior

  • When showing the overlay, either on the p-button or button element,...
    • the aria-expanded attribute should be set to true
    • the aria-controls attribute should be set to the id of the overlay
  • After closing the overlay...
    • the aria-expanded attribute is either removed or set to false
    • the aria-controls attribute is removed
@MaSch0212 MaSch0212 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 24, 2024
@natebundy
Copy link

Seems like they're planning on leaving implementing this up to the user and the documentation is currently incorrect.

See #14493

@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,

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

3 participants