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

DropDown Accessibility Issue: Scrollable region must have keyboard access #14852

Closed
HellinSunWTW opened this issue Feb 21, 2024 · 2 comments
Closed
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA PRO Support Issue was reported by PRO User Status: Discussion Issue or pull request needs to be discussed by Core Team

Comments

@HellinSunWTW
Copy link

Describe the bug

Click the dropdown to open the list -> Scan the page using Axe Dev Tools with dropdown menu open

The Axe Dev Tools for Accessibility is reporting the following issue: Scrollable region must have keyboard access

image

Potential solution: Adding a tabindex="0" might fix this issue

Environment

Windows 10

Reproducer

No response

Angular version

17.2.1

PrimeNG version

17.7.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.0

Browser(s)

Edge

Steps to reproduce the behavior

  1. Install the Axe Dev Tools for Accessibility plug-in.

  2. Visit the PrimeNG dropdown page (https://primeng.org/dropdown) on Chrome/Edge browser.

  3. Click to open any dropdown menu

  4. Scan the page with Axe

Expected behavior

No response

@HellinSunWTW HellinSunWTW added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 21, 2024
@mehmetcetin01140 mehmetcetin01140 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 Feb 26, 2024
@mehmetcetin01140 mehmetcetin01140 added this to the 17.9.0 milestone Feb 26, 2024
@mehmetcetin01140 mehmetcetin01140 added the PRO Support Issue was reported by PRO User label Feb 27, 2024
@mehmetcetin01140 mehmetcetin01140 self-assigned this Feb 27, 2024
@cetincakiroglu cetincakiroglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Feb 28, 2024
@cetincakiroglu cetincakiroglu self-assigned this Feb 28, 2024
@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Feb 28, 2024

Hi,

Thanks for raising the issue.

Unfortunately, adding tabindex to the element with the .p-dropdown-items-wrapper class does not solve the problem and disrupts the component's current accessibility behavior, leading to a breaking change. We also use the same accessibility features in PrimeVue and PrimeReact. To avoid affecting our other Prime UI Libraries (PrimeVue & PrimeReact) and UIKit, the team will discuss this issue and make improvements accordingly. I am moving this issue to the next milestone until a decision is made.

@cetincakiroglu cetincakiroglu modified the milestones: 17.9.0, 17.10.0 Feb 28, 2024
@cetincakiroglu cetincakiroglu added Status: Discussion Issue or pull request needs to be discussed by Core Team and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Feb 28, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

After considering and discussing the issue you shared as a team, we have found that the reason for Axe Devtools reporting an error here is due to our focus operation in the component using visual focus. In fact, focus is being applied to the elements within the area where the error occurs, but this focus is applied from within the component using our custom logic rather than giving tabindex to the elements. In this case, accessibility tools like Axe cannot find focusable elements in the area because the elements do not have a tabindex, leading to the error you are seeing.

Making the mentioned area focusable allows the tests to pass with tools, but it disrupts the keyboard support logic we have implemented for accessibility, the component becomes unusable with the keyboard. Accessibility tools cannot detect visual focus yet. Unfortunately, in this situation, we are unable to intervene in the issue. However, to make the test pass, you can use the templating option to add a hidden focusable element to the first element.

Closing the issue, thanks for reporting.

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 PRO Support Issue was reported by PRO User Status: Discussion Issue or pull request needs to be discussed by Core Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants