_changeTab() {
    const tabs = this.querySelectorAll('.web-tabs__tab');
    const panels = this.querySelectorAll('.web-tabs__panel');
    const activeTab = tabs[this.activeTab];
    const activePanel = panels[this.activeTab];

    if (activeTab) {
      for (const tab of tabs) {
        tab.setAttribute('aria-selected', 'false');
        tab.setAttribute('tabindex', '-1');
      }

      activeTab.setAttribute('aria-selected', 'true');
      activeTab.removeAttribute('tabindex');
    }

    if (activePanel) {
      for (const panel of panels) {
        panel.hidden = true;
      }

      activePanel.hidden = false;
    }
  }
// Update state of tabs and associated panels.
Update state of tabs and associated panels.
Update state of tabs and associated panels .
_changeTab() {
    const tabs = this.querySelectorAll('.web-tabs__tab');
    const panels = this.querySelectorAll('.web-tabs__panel');
    const activeTab = tabs[this.activeTab];
    const activePanel = panels[this.activeTab];
    if (activeTab) {
      for (const tab of tabs) {
        tab.setAttribute('aria-selected', 'false');
        tab.setAttribute('tabindex', '-1');
      }
      activeTab.setAttribute('aria-selected', 'true');
      activeTab.removeAttribute('tabindex');
    }
    if (activePanel) {
      for (const panel of panels) {
        panel.hidden = true;
      }
      activePanel.hidden = false;
    }
  }
_changeTab ( ) { const tabs = this . querySelectorAll ( '.web-tabs__tab' ) ; const panels = this . querySelectorAll ( '.web-tabs__panel' ) ; const activeTab = tabs [ this . activeTab ] ; const activePanel = panels [ this . activeTab ] ; if ( activeTab ) { for ( const tab of tabs ) { tab . setAttribute ( 'aria-selected' , 'false' ) ; tab . setAttribute ( 'tabindex' , '-1' ) ; } activeTab . setAttribute ( 'aria-selected' , 'true' ) ; activeTab . removeAttribute ( 'tabindex' ) ; } if ( activePanel ) { for ( const panel of panels ) { panel . hidden = true ; } activePanel . hidden = false ; } }
Update state of tabs and associated panels.
Update state of tabs and associated panels .