fix(tabs): ensure first tab is active when no active tab is provided#2072
fix(tabs): ensure first tab is active when no active tab is provided#2072akashsonune wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a tabindexValue computed signal to manage the tabindex attribute within the SiTabBaseDirective. The review identifies that using a computed signal for this logic is problematic because it depends on a non-signal property from the focus key manager, which will not trigger necessary updates during keyboard navigation. Furthermore, the current implementation may result in multiple tabs having a zero tabindex. The feedback recommends replacing the signal with a method to ensure proper re-evaluation and correct roving tabindex behavior.
|
@panch1739 @dr-itz WDYT? Alternatively as per- https://www.w3.org/WAI/ARIA/apg/patterns/tabs/ there should be at least one tab active. In that case, we can make the first non disabled tab as active if no active tab is provided. Shall we do this instead? |
15a5ae0 to
05e7c36
Compare
chintankavathia
left a comment
There was a problem hiding this comment.
@akashsonune please rebase
7af8f17 to
157d20f
Compare
@chintankavathia can you check. I discussed it with @panch1739 and we decided that there should be at least one tab selected/active when nothing is provided, in this case the first one. this solves the issue of keyboard reachable tabs as there will always be a active tab |
157d20f to
7a9190e
Compare
7a9190e to
dc3abe1
Compare
|
@chintankavathia updated, please check |
Tablist is not reachable when there is no active tab
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: