Skip to content

Commit d1d828d

Browse files
committed
Add the missing 'aria-selected' attribute
1 parent 672007f commit d1d828d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

playground/src/TabPane.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ export class TabPane extends React.Component<ITabPaneProps, ITabPaneState> {
4444
for (let i: number = 0; i < this.props.tabs.length; ++i) {
4545
const tabDefinition: ITabDefinition = this.props.tabs[i];
4646

47+
let ariaSelected: boolean = false;
4748
let tabStyleToUse: React.CSSProperties;
4849
if (i === this.state.selectedTabIndex) {
4950
selectedTabDefinition = tabDefinition;
51+
ariaSelected = true;
5052

5153
tabStyleToUse = {
5254
...TAB_STYLE,
@@ -72,6 +74,7 @@ export class TabPane extends React.Component<ITabPaneProps, ITabPaneState> {
7274
style={{ textDecorationLine: 'none', color: '#000000' }}
7375
onClick={this._onClickTabBindings[i]}
7476
role="tab"
77+
aria-selected={ariaSelected}
7578
>
7679
{tabDefinition.title}
7780
</a>

0 commit comments

Comments
 (0)