@syncfusion/ej2-navigations 34.2.7 → 34.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7423,6 +7423,9 @@ let Accordion = class Accordion extends Component {
7423
7423
  const newVal = Object(newProp.items[parseInt(index.toString(), 10)])[`${property[parseInt(k.toString(), 10)]}`];
7424
7424
  const temp = property[parseInt(k.toString(), 10)];
7425
7425
  const content = select('.' + CLS_CTENT, item);
7426
+ if (temp === 'expanded' && !newVal && !isNullOrUndefined(item) && item.classList.contains(CLS_ACTIVE)) {
7427
+ this.expandItem(false, index);
7428
+ }
7426
7429
  if (temp === 'header' || temp === 'iconCss' || temp === 'expanded' || ((temp === 'content') && (oldVal === ''))) {
7427
7430
  this.updateItem(item, index);
7428
7431
  }
@@ -8362,7 +8365,6 @@ let Tab = class Tab extends Component {
8362
8365
  this.tbObj.isStringTemplate = true;
8363
8366
  this.tbObj.createElement = this.createElement;
8364
8367
  this.tbObj.appendTo(this.hdrEle);
8365
- attributes(this.hdrEle, { role: 'tablist' });
8366
8368
  if (!isNullOrUndefined(this.element.getAttribute('aria-label'))) {
8367
8369
  this.hdrEle.setAttribute('aria-label', this.element.getAttribute('aria-label'));
8368
8370
  this.element.removeAttribute('aria-label');
@@ -8371,6 +8373,16 @@ let Tab = class Tab extends Component {
8371
8373
  this.hdrEle.setAttribute('aria-labelledby', this.element.getAttribute('aria-labelledby'));
8372
8374
  this.element.removeAttribute('aria-labelledby');
8373
8375
  }
8376
+ const scrollContent = this.tbObj.element.querySelector('.' + (this.isVertical() ? CLS_VSCRCNT : CLS_HSCRCNT));
8377
+ const popupContainer = select('.' + CLS_TB_POP, this.tbObj.element);
8378
+ const isScrollableMode = this.overflowMode === 'Scrollable' || this.overflowMode === 'MultiRow';
8379
+ const isPopupMode = this.overflowMode === 'Popup' || this.overflowMode === 'Extended';
8380
+ if (isScrollableMode) {
8381
+ this.setTablistRole(scrollContent);
8382
+ }
8383
+ else if (isPopupMode) {
8384
+ this.setTablistRole(popupContainer);
8385
+ }
8374
8386
  this.updatePopupIconAriaLabel();
8375
8387
  this.setCloseButton(this.showCloseButton);
8376
8388
  const toolbarHeader = this.tbObj.element.querySelector('.' + CLS_TB_ITEMS);
@@ -8378,6 +8390,14 @@ let Tab = class Tab extends Component {
8378
8390
  if (isNullOrUndefined(toolbarHeader.id) || toolbarHeader.id === '') {
8379
8391
  toolbarHeader.id = this.element.id + '_' + 'tab_header_items';
8380
8392
  }
8393
+ if (isPopupMode || (isScrollableMode && isNullOrUndefined(scrollContent))) {
8394
+ this.setTablistRole(toolbarHeader);
8395
+ }
8396
+ }
8397
+ }
8398
+ setTablistRole(el) {
8399
+ if (!isNullOrUndefined(el)) {
8400
+ attributes(el, { role: 'tablist' });
8381
8401
  }
8382
8402
  }
8383
8403
  updatePopupIconAriaLabel() {