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: Carousel accessibility issue #16552

Closed
Nostrs opened this issue Oct 15, 2024 · 0 comments · Fixed by #16654
Closed

Component: Carousel accessibility issue #16552

Nostrs opened this issue Oct 15, 2024 · 0 comments · Fixed by #16654
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@Nostrs
Copy link

Nostrs commented Oct 15, 2024

Describe the bug

Hello,

I’ve encountered an accessibility problem when using the p-carousel component. Specifically, when I include interactive elements inside the carousel items, the axe DevTools extension reports the following warning:

Aria-hidden element must not be focusable or contain focusable elements.

Please let me know if you need further information or assistance in reproducing the issue.

Thank you for your attention to this matter.

Environment

All environments

Reproducer

https://stackblitz.com/edit/stackblitz-starters-q6ccoe?embed=1&file=src%2Fmain.ts

Angular version

17.3.11

PrimeNG version

17.18.11

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.1.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Integrate the p-carousel component into your project.
  2. Add interactive elements (e.g., buttons, links) inside the carousel slides.
  3. Run an accessibility audit using the axe DevTools browser extension.
    Stackblitz: https://stackblitz.com/edit/stackblitz-starters-q6ccoe?embed=1&file=src%2Fmain.ts

Expected behavior

Expected Behavior:

•	The carousel should handle interactive elements without causing accessibility violations.
•	No warnings or errors should be reported by accessibility testing tools.

Actual Behavior:

•	The axe DevTools reports that focusable elements are nested within elements that have aria-hidden="true".
•	This creates accessibility issues, as hidden elements should not be focusable.
@Nostrs Nostrs added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 15, 2024
mateuszstudentzero pushed a commit to mateuszstudentzero/primeng-zio that referenced this issue Oct 28, 2024
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 18, 2024
@mertsincan mertsincan added this to the 17.18.13 milestone Nov 18, 2024
mertsincan pushed a commit that referenced this issue Nov 18, 2024
Co-authored-by: Mateusz Adamczyk <mateuszadamczyk@mateuszs-macbook-pro.home>
@mertsincan mertsincan moved this to Done in PrimeNG Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants