Skip to content

Commit

Permalink
Better aria roles
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Dec 12, 2017
1 parent ecd7790 commit eff3b79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/tabview/TabView.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export class TabView extends Component {
let ariaControls = this.id + '_content_' + index;

return (
<li className={className} role="tab" style={tab.props.headerStyle}>
<a href={'#' + ariaControls} onClick={(e) => this.onTabHeaderClick(e, tab, index)} id={id} aria-controls={ariaControls} aria-selected={selected} >
<li className={className} role="presentation" style={tab.props.headerStyle}>
<a role="tab" href={'#' + ariaControls} onClick={(e) => this.onTabHeaderClick(e, tab, index)} id={id} aria-controls={ariaControls} aria-selected={selected} >
{tab.props.leftIcon && <span className={classNames('ui-tabview-left-icon fa', tab.props.leftIcon)}></span>}
<span className="ui-tabview-title">{tab.props.header}</span>
{tab.props.rightIcon && <span className={classNames('ui-tabview-right-icon fa', tab.props.rightIcon)}></span>}
Expand Down Expand Up @@ -115,7 +115,7 @@ export class TabView extends Component {
let ariaLabelledBy = this.id + '_header_' + index;

return (
<div id={id} aria-labelledby={ariaLabelledBy} aria-hidden={!selected} className={className} style={tab.props.contentStyle}>
<div id={id} aria-labelledby={ariaLabelledBy} aria-hidden={!selected} className={className} style={tab.props.contentStyle} role="tabpanel">
{tab.props.children}
</div>
);
Expand Down

0 comments on commit eff3b79

Please sign in to comment.