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

Tearsheet: add first focusable element #2923

Closed
elycheea opened this issue Apr 25, 2023 · 3 comments
Closed

Tearsheet: add first focusable element #2923

elycheea opened this issue Apr 25, 2023 · 3 comments
Assignees
Labels
component: Tearsheet needs: investigation A technical issue needs to be researched version: 2 Carbon 11 / v2

Comments

@elycheea
Copy link
Contributor

In v2, first focusable element in the Tearsheet requires two tabs. In CreateTearsheet, we do allow users to set initial focus. This should be moved to the base Tearsheet.

i was looking into this issue and it's definitely doable as is, but the problem is with create tearsheet. there's no good way to enable the focus functionality in tearsheet without it impacting the already built in focus functionality in create tearsheet. my recommendation is to pull out the focus functionality in create tearsheet and create a general focus function in tearsheet.

Originally posted by @davidmenendez in #2783 (comment)

@elycheea
Copy link
Contributor Author

@davidmenendez let’s verify if selectorPrimaryFocus in Tearsheet resolves the issue and also verify if this is the intended behavior.

@matthewgallo suggested Tearsheet follows an opt in approach for first focus.

@elycheea elycheea added the needs: investigation A technical issue needs to be researched label Apr 27, 2023
@davidmenendez
Copy link
Contributor

confirmed that passing selectorPrimaryFocus will work. i think it just may need to be displayed in the documentation to ensure this functionality is surfaced to the user. i'll open up a PR to include selectorPrimaryFocus in the storybook stories.

@davidmenendez
Copy link
Contributor

i'd also like to point out this comment in this issue #2452 (comment)

i think it may still be worthwhile to remove or refactor the specific create tearsheet focus functionality in order to resolve this. additional investigation is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Tearsheet needs: investigation A technical issue needs to be researched version: 2 Carbon 11 / v2
Projects
None yet
Development

No branches or pull requests

2 participants