carbon-design-system / ibm-products

A Carbon-powered React component library for IBM Products
https://carbon-for-ibm-products.netlify.app/
Apache License 2.0
88 stars 126 forks source link

[a11y]: Focus coming out of Tearsheet Narrow component #5598

Open psurana2 opened 1 week ago

psurana2 commented 1 week ago

Package

@carbon/ibm-products

Browser

Chrome, Firefox

Operating System

MacOS

Package version

v2.27.0

React version

v17.0.2

Automated testing tool and ruleset

Manual

Assistive technology

No response

Description

When we stack one tearsheet over the other , and when we close the second tearsheet the focus should return back to the first tearsheet. But the focus is coming out of the tearsheet .

WCAG 2.1 Violation

No response

Reproduction/example

https://stackblitz.com/edit/github-hlqngl?file=src%2FExample%2FExample.jsx

Steps to reproduce

Close the second tearsheet component , the focus should return to the parent tearsheet

Code of Conduct

elycheea commented 1 week ago

@psurana2 Have you tried using the selectorPrimaryFocus prop for the second Tearsheet?

psurana2 commented 1 week ago

No @elycheea I have not tried . Can u help me with it