Skip to content

Select should not add aria-hidden when opened #8313

Closed
@mauron85

Description

@mauron85

Provide a general summary of the issue here

Currently when Select is opened, it adds aria-hidden to its parent.

But if parent has children that are focusable it violates rule:

Make sure elements with aria-hidden="true" do not contain focusable elements using one or more of the following methods.

https://accessibilityinsights.io/info-examples/web/aria-hidden-focus/

🤔 Expected Behavior?

Don't add aria-hidden to parent component when it contains children that are focusable.

😯 Current Behavior

Currently when Select is opened, it adds aria-hidden to its parent.

💁 Possible Solution

No response

🔦 Context

I believe functionality behind this is ariaHideOutside

export function ariaHideOutside(targets: Element[], root = document.body) {

🖥️ Steps to Reproduce

Visit https://react-spectrum.adobe.com/react-aria/Select.html

Open devtools:

  1. click on Select
  2. check first div right after body - it now has aria-hidden true attr.

Image

Version

react-aria: 3.40.0, react-aria-components: 1.9.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Windows

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions