MCPcopy
hub / github.com/angular/components / isTabFocused

Function isTabFocused

src/aria/tabs/tabs.spec.ts:118–124  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

116 }
117
118 function isTabFocused(index: number): boolean {
119 if (testComponent.focusMode() === 'roving') {
120 return tabElements[index]?.getAttribute('tabindex') === '0';
121 } else {
122 return tabListElement?.getAttribute('aria-activedescendant') === tabElements[index]?.id;
123 }
124 }
125
126 afterEach(async () => {
127 if (fixture.nativeElement) {

Callers 1

tabs.spec.tsFile · 0.85

Calls 1

getAttributeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…