set selected(isSelected) {
    const isValueTruthy = stringToBool(isSelected);

    if (!isValueTruthy) {
      this.removeAttribute('selected');
      this.container.classList.remove('selected');
      this.container?.children?.[0]?.removeAttribute?.('font-weight');
      this.setAttribute('tabindex', '-1');
    } else {
      this.setAttribute('selected', '');
      this.container?.children?.[0]?.setAttribute?.('font-weight', 'bold');
      this.container.classList.add('selected');
      this.setAttribute('tabindex', '0');

      if (!this.#prevSelected) {
        // reqAnimFrame needed to fire for context to read reliably due to onEvent binding
        window.requestAnimationFrame(() => {
          this.triggerEvent('tabselect', this, { bubbles: true });
        });
      }
    }
    this.#prevSelected = isValueTruthy;
    this.setAttribute('aria-selected', `${Boolean(this.selected)}`);
  }
/**
   * @param {boolean} isSelected Whether or not this tab is selected.
   */
@param {boolean} isSelected Whether or not this tab is selected.
@param { boolean } isSelected Whether or not this tab is selected .
set selected(isSelected) {
    const isValueTruthy = stringToBool(isSelected);
    if (!isValueTruthy) {
      this.removeAttribute('selected');
      this.container.classList.remove('selected');
      this.container?.children?.[0]?.removeAttribute?.('font-weight');
      this.setAttribute('tabindex', '-1');
    } else {
      this.setAttribute('selected', '');
      this.container?.children?.[0]?.setAttribute?.('font-weight', 'bold');
      this.container.classList.add('selected');
      this.setAttribute('tabindex', '0');
      if (!this.#prevSelected) {
        window.requestAnimationFrame(() => {
          this.triggerEvent('tabselect', this, { bubbles: true });
        });
      }
    }
    this.#prevSelected = isValueTruthy;
    this.setAttribute('aria-selected', `${Boolean(this.selected)}`);
  }
set selected ( isSelected ) { const isValueTruthy = stringToBool ( isSelected ) ; if ( ! isValueTruthy ) { this . removeAttribute ( 'selected' ) ; this . container . classList . remove ( 'selected' ) ; this . container ?. children ?. [ 0 ] ?. removeAttribute ?. ( 'font-weight' ) ; this . setAttribute ( 'tabindex' , '-1' ) ; } else { this . setAttribute ( 'selected' , '' ) ; this . container ?. children ?. [ 0 ] ?. setAttribute ?. ( 'font-weight' , 'bold' ) ; this . container . classList . add ( 'selected' ) ; this . setAttribute ( 'tabindex' , '0' ) ; if ( ! this . #prevSelected ) { window . requestAnimationFrame ( ( ) => { this . triggerEvent ( 'tabselect' , this , { bubbles : true } ) ; } ) ; } } this . #prevSelected = isValueTruthy ; this . setAttribute ( 'aria-selected' , ` ${ Boolean ( this . selected ) } ` ) ; }
@param {boolean} isSelected Whether or not this tab is selected.
@param { boolean } isSelected Whether or not this tab is selected .
// reqAnimFrame needed to fire for context to read reliably due to onEvent binding