fix(tabs): ensure tabs become enabled when parent disabled attribute is removed#5323
fix(tabs): ensure tabs become enabled when parent disabled attribute is removed#5323blunteshwar merged 6 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 8167175 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. |

Description
This PR updates the
focusInIndexmethod of the sp-tabs'RovingTabindexControllerin order to correctly find the element that should be focused even when the disabled property gets changed fromtruetofalse(or gets removed).Related issue(s)
Motivation and context
This change now allows the
focusElementto return the selected tab instead ofthis, which in turn allowsfocusable.ts'shandleDisabledChangedmethod to set thedisabledproperty of the selected tab tofalse.How has this been tested?
Test case 1
disabledandaria-disabledattributesdisabledattribute (or set it tofalseby using$0.disabled = false)disabledandaria-disabledattributes 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.