@syncfusion/ej2-navigations 35.2.12 → 35.2.13

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.
@@ -4608,6 +4608,9 @@ let Toolbar = class Toolbar extends Component {
4608
4608
  let width = 0;
4609
4609
  let style;
4610
4610
  [].slice.call(selectAll('.' + CLS_ITEM, items)).forEach((el) => {
4611
+ if (el.parentElement && closest(el.parentElement, '.e-toolbar') !== this.element) {
4612
+ return;
4613
+ }
4611
4614
  if (isVisible(el)) {
4612
4615
  style = window.getComputedStyle(el);
4613
4616
  width += this.isVertical ? el.offsetHeight : el.offsetWidth;
@@ -8369,6 +8372,43 @@ let Tab = class Tab extends Component {
8369
8372
  this.setRTL(this.enableRtl);
8370
8373
  }
8371
8374
  }
8375
+ updateTablistRole() {
8376
+ if (isNullOrUndefined(this.tbObj) || isNullOrUndefined(this.tbObj.element)) {
8377
+ return;
8378
+ }
8379
+ const scrollContent = this.tbObj.element.querySelector('.' + (this.isVertical() ? CLS_VSCRCNT : CLS_HSCRCNT));
8380
+ const toolbarHeader = this.tbObj.element.querySelector('.' + CLS_TB_ITEMS);
8381
+ const popupContainer = this.tbObj.element.querySelector('.' + CLS_TB_POP);
8382
+ const isScrollableMode = this.overflowMode === 'Scrollable' ||
8383
+ this.overflowMode === 'MultiRow';
8384
+ const isPopupMode = this.overflowMode === 'Popup' ||
8385
+ this.overflowMode === 'Extended';
8386
+ if (!isNullOrUndefined(scrollContent)) {
8387
+ scrollContent.removeAttribute('role');
8388
+ }
8389
+ if (!isNullOrUndefined(toolbarHeader)) {
8390
+ toolbarHeader.removeAttribute('role');
8391
+ }
8392
+ if (!isNullOrUndefined(popupContainer)) {
8393
+ popupContainer.removeAttribute('role');
8394
+ }
8395
+ if (isScrollableMode) {
8396
+ if (!isNullOrUndefined(scrollContent)) {
8397
+ this.setTablistRole(scrollContent);
8398
+ }
8399
+ else if (!isNullOrUndefined(toolbarHeader)) {
8400
+ this.setTablistRole(toolbarHeader);
8401
+ }
8402
+ }
8403
+ else if (isPopupMode) {
8404
+ if (!isNullOrUndefined(popupContainer)) {
8405
+ this.setTablistRole(popupContainer);
8406
+ }
8407
+ if (!isNullOrUndefined(toolbarHeader)) {
8408
+ this.setTablistRole(toolbarHeader);
8409
+ }
8410
+ }
8411
+ }
8372
8412
  renderHeader() {
8373
8413
  const hdrPlace = this.headerPlacement;
8374
8414
  let tabItems = [];
@@ -10517,6 +10557,7 @@ let Tab = class Tab extends Component {
10517
10557
  const hdrEle = this.getTabHeader();
10518
10558
  setStyleAttribute(this.cntEle, { 'height': (this.element.clientHeight - hdrEle.offsetHeight) + 'px' });
10519
10559
  }
10560
+ this.updateTablistRole();
10520
10561
  const activeEle = select('.' + CLS_TB_ITEM + '.' + CLS_TB_POPUP + '.' + CLS_ACTIVE$1, this.element);
10521
10562
  if (!isNullOrUndefined(activeEle) && this.reorderActiveTab) {
10522
10563
  this.select(this.getEleIndex(activeEle));