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

Prevent keyboard navigation to hidden tab #6789

Merged
merged 6 commits into from
Aug 2, 2023

Conversation

m-akinc
Copy link
Contributor

@m-akinc m-akinc commented Jul 27, 2023

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

  • I have included a change request file using $ yarn change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

⏭ Next Steps

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

@chrisdholt
Copy link
Member

Thanks for this and including tests!

@chrisdholt chrisdholt merged commit 50dba9c into microsoft:master Aug 2, 2023
5 checks passed
@m-akinc m-akinc deleted the prevent-hidden-tab-nav branch August 2, 2023 15:43
m-akinc added a commit to m-akinc/fast that referenced this pull request Aug 2, 2023
* Prevent keyboard navigation to hidden tab

* Change files

* Fix issue with Home/End

* use hasAttribute

* Update change/@microsoft-fast-foundation-7d8d0430-523b-473a-af77-e2bcf0bc6e38.json

* Update change/@microsoft-fast-foundation-7d8d0430-523b-473a-af77-e2bcf0bc6e38.json

---------

Co-authored-by: Nicholas Rice <3213292+nicholasrice@users.noreply.github.com>
m-akinc added a commit to m-akinc/fast that referenced this pull request Aug 2, 2023
* Prevent keyboard navigation to hidden tab

* Change files

* Fix issue with Home/End

* use hasAttribute

* Update change/@microsoft-fast-foundation-7d8d0430-523b-473a-af77-e2bcf0bc6e38.json

* Update change/@microsoft-fast-foundation-7d8d0430-523b-473a-af77-e2bcf0bc6e38.json

---------

Co-authored-by: Nicholas Rice <3213292+nicholasrice@users.noreply.github.com>
@m-akinc
Copy link
Contributor Author

m-akinc commented Aug 2, 2023

@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?

@chrisdholt
Copy link
Member

@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 :)

chrisdholt added a commit that referenced this pull request Aug 10, 2023
* [cherry-pick] fix(tabs): home and end navigation (#6298)

* fix(tabs): home and end navigation

* Change files

* Update packages/web-components/fast-foundation/src/tabs/stories/tabs.stories.ts

Co-authored-by: John Kreitlow <863023+radium-v@users.noreply.github.com>

* apply pr comments

* Revert "apply pr comments"

This reverts commit 09a6523.

* apply pr comment

* Update change/@microsoft-fast-foundation-dc08ca7b-be41-4f42-a66c-c0874376b4a2.json

Co-authored-by: John Kreitlow <863023+radium-v@users.noreply.github.com>

Co-authored-by: John Kreitlow <863023+radium-v@users.noreply.github.com>
Co-authored-by: Chris Holt <chhol@microsoft.com>

* [cherry-pick] Prevent keyboard navigation to hidden tab (#6789)

* Prevent keyboard navigation to hidden tab

* Change files

* Fix issue with Home/End

* use hasAttribute

* Update change/@microsoft-fast-foundation-7d8d0430-523b-473a-af77-e2bcf0bc6e38.json

* Update change/@microsoft-fast-foundation-7d8d0430-523b-473a-af77-e2bcf0bc6e38.json

---------

Co-authored-by: Nicholas Rice <3213292+nicholasrice@users.noreply.github.com>

* Update change files

---------

Co-authored-by: Mathieu Lavoie <44816587+m4thieulavoie@users.noreply.github.com>
Co-authored-by: John Kreitlow <863023+radium-v@users.noreply.github.com>
Co-authored-by: Chris Holt <chhol@microsoft.com>
Co-authored-by: Nicholas Rice <3213292+nicholasrice@users.noreply.github.com>
janechu pushed a commit that referenced this pull request Jun 10, 2024
* Prevent keyboard navigation to hidden tab

* Change files

* Fix issue with Home/End

* use hasAttribute

* Update change/@microsoft-fast-foundation-7d8d0430-523b-473a-af77-e2bcf0bc6e38.json

* Update change/@microsoft-fast-foundation-7d8d0430-523b-473a-af77-e2bcf0bc6e38.json

---------

Co-authored-by: Nicholas Rice <3213292+nicholasrice@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants