-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(Tabs): keep selected tab in view #7045
fix(Tabs): keep selected tab in view #7045
Conversation
Deploy preview for carbon-elements ready! Built with commit 2011d31 |
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit 2011d31 https://deploy-preview-7045--carbon-components-react.netlify.app |
@emyarod random question, is there a chance that this |
no it shouldn't be scrolled in the y direction (related #6974) edit: I am assuming you are not referring to the default behavior where changing focus also scrolls the focused element into view |
@tw15egan I'm unable to replicate that issue. Can you provide more details about how you're getting that to occur? |
Seeing the same bug as @tw15egan on Firefox latest Windows 10 |
18103e2
to
cd0702d
Compare
can you take another look with the latest PR changes? |
a093c0c
to
15b43b8
Compare
15b43b8
to
f5b1cec
Compare
bump @dakahn based on comment above |
Scrolling works swell! 👍 |
* fix(Tab): update role * fix(Tab): place aria attributes on inner anchor instead of li * test(Tabs): update tab role test * fix(Tab): convert anchor to button * test(Tabs): update inner anchor tests * chore: update snapshots * test(Tab): update test descriptions * test(Tab): remove obsolete test * fix(Tab): remove tabIndex from wrapper li * fix(Tab): add role to button * fix(Tab): deprecate required href prop * fix(TabContent): remove `aria-live` and `aria-hidden` * chore: update snapshots * test(Tab): update test description * chore(Tab): deprecate tabIndex prop * docs(Tabs): add tabpanel role to custom tab content wrapper * chore: update snapshots * fix(Tabs): activate scroll buttons with LMB only * fix(Tabs): prevent keyboard focus of scroll buttons * fix(Tabs): prevent ul from being focusable * refactor(Tabs): carry over changes from #7045 Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Closes #6917
This PR makes sure the selected tab in the component state is visible (component scrolls to the selected tab) when the component updates
Changelog
Changed
Testing / Reviewing
Change the selected tab and confirm that the tab is in view on initial render in addition to subsequent renders