Fix usages of ARIA tabpanel (#10628)
* RovingTabIndex handle looping around start/end * Make TabbedView expose aria tabpanel/tablist/tab roles * Fix right panel being wrongly specified as aria tabs Not all right panels map to the top right header buttons so we cannot describe it as a tabpanel relation * tsc strict * Update snapshots * Fix ARIA AXE violation * Update tests
This commit is contained in:
parent
961b843662
commit
a1a087f755
9 changed files with 153 additions and 66 deletions
|
@ -54,8 +54,7 @@ export default class HeaderButton extends React.Component<IProps> {
|
|||
return (
|
||||
<AccessibleTooltipButton
|
||||
{...props}
|
||||
aria-selected={isHighlighted}
|
||||
role="tab"
|
||||
aria-current={isHighlighted ? "true" : "false"}
|
||||
title={title}
|
||||
alignment={Alignment.Bottom}
|
||||
className={classes}
|
||||
|
|
|
@ -98,10 +98,6 @@ export default abstract class HeaderButtons<P = {}> extends React.Component<IPro
|
|||
public abstract renderButtons(): JSX.Element;
|
||||
|
||||
public render(): React.ReactNode {
|
||||
return (
|
||||
<div className="mx_HeaderButtons" role="tablist">
|
||||
{this.renderButtons()}
|
||||
</div>
|
||||
);
|
||||
return <div className="mx_HeaderButtons">{this.renderButtons()}</div>;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue