Skip to content

Commit

Permalink
[SITES-25655][Regression] (#360)
Browse files Browse the repository at this point in the history
Fixes race condition where `_setHeaderCellScope` is called before `headerCell.content` has initialized.
  • Loading branch information
majornista authored Oct 14, 2024
1 parent 57d6848 commit 3db8054
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coral-component-table/src/scripts/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -2462,6 +2462,10 @@ const Table = Decorator(class extends BaseComponent(HTMLTableElement) {
headerCell.setAttribute('role', 'rowheader');
}
headerCell.setAttribute('scope', scope);

if(headerCell.hasAttribute('sortable') && headerCell.content){
headerCell.content.setAttribute('role', 'button');
}
}

/** @private */
Expand Down

0 comments on commit 3db8054

Please sign in to comment.