-
Notifications
You must be signed in to change notification settings - Fork 217
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): ensure tabs become enabled when parent disabled attribute is removed #5323
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: bb87c04 The changes in this PR will be included in the next version bump. This PR includes changesets to release 84 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Branch previewReview the following VRT differencesWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
If the changes are expected, update the |
Tachometer resultsCurrently, no packages are changed by this PR... |
@mizgaionutalexandru It looks like the styles for tabs aren't carrying through, I'll help investigate it |
Looks like it was a bad build in the check, PR links look accurate now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR updates the
focusInIndex
method of the sp-tabs'RovingTabindexController
in order to correctly find the element that should be focused even when the disabled property gets changed fromtrue
tofalse
(or gets removed).Related issue(s)
Motivation and context
This change now allows the
focusElement
to return the selected tab instead ofthis
, which in turn allowsfocusable.ts
'shandleDisabledChanged
method to set thedisabled
property of the selected tab tofalse
.How has this been tested?
Test case 1
disabled
andaria-disabled
attributesdisabled
attribute (or set it tofalse
by using$0.disabled = false
)disabled
andaria-disabled
attributes are no longer present, for both the sp-tabs and the selected tabDid it pass in Desktop?
Did it pass in Mobile?
Did it pass in iPad?
Before:
After:
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.