fix(tabs): ensure tablist is keyboard reachable when no active tab is defined#2072
fix(tabs): ensure tablist is keyboard reachable when no active tab is defined#2072akashsonune wants to merge 19 commits into
Conversation
…kerConfig BREAKING CHANGE: `CriterionDefinition.datepickerConfig` type narrowed The type of `datepickerConfig` in `CriterionDefinition` (filtered-search) changed from `DatepickerInputConfig` to `Omit<DatepickerInputConfig, 'enableDateRange' | 'enableTwoMonthDateRange'>`. The properties `enableDateRange` and `enableTwoMonthDateRange ` are no longer accepted in `datepickerConfig` when used with filtered-search criteria, as they had no effect in that context. Migration: Remove any `enableDateRange` and `enableTwoMonthDateRange` properties from your `datepickerConfig` objects passed to `CriterionDefinition`.
Adding a set of utilities that allows customers to create selects with custom backed value selection, for instance using `si-tree-view`. A very simple version of it can look like this: ```ts @component({ selector: 'app-tree-select', imports: [SiSelectComboboxComponent, SiSelectDropdownDirective, SiTreeViewComponent], template: ` <si-select-combobox> @if (select.value(); as val) { {{ val }} } @else { <span class="text-secondary">Select a location...</span> } </si-select-combobox> <ng-template si-select-dropdown> <si-tree-view class="d-block" ariaLabel="Locations" [items]="items()" [enableSelection]="true" [singleSelectMode]="true" [isVirtualized]="false" (treeItemClicked)="selectItem($event)" /> </ng-template> `, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [ { directive: SiCustomSelectDirective, inputs: ['disabled', 'readonly', 'value'], outputs: ['valueChange'] } ] }) export class TreeSelectComponent { protected readonly select = inject(SiCustomSelectDirective); /** The tree items to display. */ readonly items = input<TreeItem[]>([]); selectItem(item: TreeItem): void { if (item.label) { this.select.updateValue(item.label as string); this.select.close(); } } } ``` The goal is to empower applications to build selects with whatever content they need while we take care of accesibility and proper appereance. Closes #1840
chore(demo): wrap thead th elements in tr for proper table styling
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
Tablist is not reachable when there is no active tab
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: