Skip to content

Commit

Permalink
Add two TODO notes about where the tab aria-selected state might need…
Browse files Browse the repository at this point in the history
… to be updated.
  • Loading branch information
jasongrout authored and telamonian committed Nov 17, 2020
1 parent 8e68bcc commit 77a8017
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/widgets/src/tabbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,9 @@ class TabBar<T> extends Widget {
let ci = this._currentIndex;
let bh = this.insertBehavior;


// TODO: do we need to do an update to update the aria-selected attribute?

// Handle the behavior where the new tab is always selected,
// or the behavior where the new tab is selected if needed.
if (bh === 'select-tab' || (bh === 'select-tab-if-needed' && ci === -1)) {
Expand Down Expand Up @@ -1071,6 +1074,8 @@ class TabBar<T> extends Widget {
return;
}

// TODO: do we need to do an update to adjust the aria-selected value?

// No tab gets selected if the tab bar is empty.
if (this._titles.length === 0) {
this._currentIndex = -1;
Expand Down

0 comments on commit 77a8017

Please sign in to comment.