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

Dialog: (accessibility) "display: none" inside dialog breaks focus tabbing #6095

Closed
arnodemer opened this issue Mar 6, 2024 · 2 comments · Fixed by #6435
Closed

Dialog: (accessibility) "display: none" inside dialog breaks focus tabbing #6095

arnodemer opened this issue Mar 6, 2024 · 2 comments · Fixed by #6435
Assignees
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA
Milestone

Comments

@arnodemer
Copy link
Contributor

arnodemer commented Mar 6, 2024

Describe the bug

When a Dialog contains a section with "display: none" and a as child of section, user cannot reach each focusable input/buttons/... using TAB key.

Reproducer

https://stackblitz.com/edit/qejj7w?file=src%2FApp.jsx

PrimeReact version

10.5.1

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. open stackBlitz app (spawn from Dialog basic showcase)
  2. use tab to move set focus on all input & buttons: (this works)
  3. open dialog
  4. use tab to move focus around dialog's buttons and inputs: Focus is stopped on input due to "display: none" section.

50 cents: Issue comes from DomHandler.getFocusableElements() ?

Note that issue is not the same as #4035

Expected behavior

All focusable elements inside a dialog box should be reached using Tab (Shift+Tab) key.

@arnodemer arnodemer added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 6, 2024
@melloware melloware added Component: Accessibility Issue or pull request is related to WCAG or ARIA and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 6, 2024
@KirilCycle
Copy link
Contributor

KirilCycle commented Apr 21, 2024

Hi @melloware,
Can i take this ? I understand why this happens, I'm curious if the onKeyDown method is strictly necessary for the dialog component. It function perfectly without it. Is this included for broader browser compatibility?

@melloware
Copy link
Member

@KirilCycle submit a PR and PrimeTek and I can review and see. I have to study it to see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA
Projects
None yet
3 participants