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

TabPanel: add support for manual activation of tabs #45390

Closed
ciampo opened this issue Oct 28, 2022 · 7 comments · Fixed by #46004
Closed

TabPanel: add support for manual activation of tabs #45390

ciampo opened this issue Oct 28, 2022 · 7 comments · Fixed by #46004
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components

Comments

@ciampo
Copy link
Contributor

ciampo commented Oct 28, 2022

Currently the TabPanel's tabpanels are activated automatically when the associated tab receives focus (referred to as "Tabs with automatic activation" on the W3C website).

However, as discussed in #44788 (comment) and in #45203 (comment), there instances in which the automatic activation doesn't fit the UX and keyboard navigation needs.

We should look into allowing the TabPanel to support manual activation as well, alongside automatic activation.

@ciampo ciampo added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components [a11y] Keyboard & Focus labels Oct 28, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 31, 2022
@ciampo
Copy link
Contributor Author

ciampo commented Oct 31, 2022

Opened a related request for the ariakit components — we could consider switching to ariakit's implementation directly, if/when manual activation is supported ariakit/ariakit#2007

@ciampo
Copy link
Contributor Author

ciampo commented Nov 1, 2022

Update — ariakit's Tab component actually already supports manual tab activation — my proposal here is to refactor the component to use ariakit instead of working on a custom implementation in the repo.

@alexstine
Copy link
Contributor

@ciampo Any idea when this might get some priority? I hate that this is now going to be a longer process and it is an active blocker for better implementation. Makes me wonder if we should patch this ourselves and make it a project for 6.2/6.3/beyond.

Thoughts?

@ciampo
Copy link
Contributor Author

ciampo commented Nov 21, 2022

Any idea when this might get some priority?

We don't have yet a precise timeline, but as of now we're hoping to start work on this sooner than later (cc'ing @ramonjd @talldan as we recently spoke about who potentially could work on the TabPanel refactor to ariakit)

I hate that this is now going to be a longer process and it is an active blocker for better implementation. Makes me wonder if we should patch this ourselves and make it a project for 6.2/6.3/beyond.

As it often happens, this is mostly a matter of assigning resources and prioritization — time spent on TabPanel is time that is not spent on another part of the project.

Also, implementing this feature on the current implementation of TabPanel can definitely be done, but it will still require time nonetheless. I would argue that the most efficient use of our time would be to work directly on the migration to ariakit, although that may take longer than adding this feature to the current implementation.

Having said that, I'll see If I can find some time in the next days to explore adding manual tab activation to the current version of TabPanel — I'll do so keeping in mind that the component will likely be migrated to ariakit in the near future.

@alexstine
Copy link
Contributor

@ciampo Can we just re-open #45411 and go from there?

Thanks.

@talldan
Copy link
Contributor

talldan commented Nov 22, 2022

We don't have yet a precise timeline, but as of now we're hoping to start work on this sooner than later (cc'ing @ramonjd @talldan as we recently spoke about who potentially could work on the TabPanel refactor to ariakit)

I'd like to do this, as there seem to be lots of problems with TabPanel. It is unfortunately fairly low on my list atm. It might be two to three weeks before I can work on it again, sorry to get your hopes up! If anyone else wants to take a look at it, I'm happy to support that with reviews.

@ntsekouras
Copy link
Contributor

@ciampo Can we just re-open #45411 and go from there?

Unfortunately that PR wasn't implementing what we wanted to, so there is no prior art for solving this in GB..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Components /packages/components
Projects
None yet
5 participants