MCPcopy Create free account
hub / github.com/UI5/webcomponents / _getFocusableRefs

Method _getFocusableRefs

packages/main/src/TabContainer.ts:1313–1340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1311 }
1312
1313 _getFocusableRefs() {
1314 if (!this.getDomRef()) {
1315 return [];
1316 }
1317
1318 const focusableRefs = [];
1319 const startOverflow = this._getStartOverflow();
1320 const endOverflow = this._getEndOverflow();
1321
1322 if (startOverflow && !startOverflow.hasAttribute("hidden")) {
1323 focusableRefs.push(this.startOverflowButton[0] || this._getStartOverflowBtnDOM());
1324 }
1325
1326 this._getTabs().forEach(tab => {
1327 const ref = tab.getDomRefInStrip();
1328 const focusable = ref && !ref.hasAttribute("hidden");
1329
1330 if (focusable) {
1331 focusableRefs.push(tab);
1332 }
1333 });
1334
1335 if (endOverflow && !endOverflow.hasAttribute("hidden")) {
1336 focusableRefs.push(this.overflowButton[0] || this._getEndOverflowBtnDOM());
1337 }
1338
1339 return focusableRefs;
1340 }
1341
1342 _getHeader() {
1343 return this.shadowRoot!.querySelector<HTMLElement>(`#${this._id}-header`)!;

Callers 1

constructorMethod · 0.95

Calls 8

_getStartOverflowMethod · 0.95
_getEndOverflowMethod · 0.95
_getTabsMethod · 0.95
_getEndOverflowBtnDOMMethod · 0.95
hasAttributeMethod · 0.80
pushMethod · 0.80
getDomRefInStripMethod · 0.45

Tested by

no test coverage detected