microsoft / fast

The adaptive interface system for modern web experiences.
https://www.fast.design
Other
9.28k stars 595 forks source link

Prevent keyboard navigation to hidden tab #6789

Closed m-akinc closed 1 year ago

m-akinc commented 1 year ago

Pull Request

πŸ“– Description

There is a bug in the tabs component where you can use the keyboard (arrows, home/end) to navigate to a hidden tab. None of the tabs will appear as active, but the tab panel for the hidden tab will be displayed.

🎫 Issues

NA

πŸ‘©β€πŸ’» Reviewer Notes

πŸ“‘ Test Plan

There is a TODO in the tabs test file for creating tests for keyboard navigation. I have created just two tests to exercise the use cases I fixed.

βœ… Checklist

General

Component-specific

⏭ Next Steps

I would like this change cherry-picked into the archives/fast-element-1 branch.

chrisdholt commented 1 year ago

Thanks for this and including tests!

m-akinc commented 1 year ago

@chrisdholt What do I need to do to get this and another related fix (https://github.com/microsoft/fast/commit/84726aa1312068d10df176709d760764d577420f) cherry-picked into archives/fast-element-1? Do I just cherry-pick them into my fork's archives/fast-element-1 and then open a pull request? Or does one of the maintainers have to cherry-pick them directly?

chrisdholt commented 1 year ago

@chrisdholt What do I need to do to get this and another related fix (84726aa) cherry-picked into archives/fast-element-1? Do I just cherry-pick them into my fork's archives/fast-element-1 and then open a pull request? Or does one of the maintainers have to cherry-pick them directly?

I tried to quickly cherry-pick this last night but there were conflicts due to package changes. I might suggest just opening a new pr against archives/fast-element-1 for simplicity. Happy to rebase it myself, but that may be quicker :)