ARIA Accessibility improvements (#10675)
* Fix confusing tab indexes in EventTilePreview * Stop using headings inside buttons * Prefer labelledby and describedby over duplicated aria-labels * Improve semantics of tables used in settings * Fix types * Update tests * Fix timestamps
This commit is contained in:
parent
259b5fe253
commit
792a39a39b
21 changed files with 197 additions and 137 deletions
|
@ -41,7 +41,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
// Controlled Toggle Switch element, written with Accessibility in mind
|
||||
export default ({ checked, disabled = false, title, tooltip, onChange, ...props }: IProps): JSX.Element => {
|
||||
export default ({ checked, disabled = false, onChange, ...props }: IProps): JSX.Element => {
|
||||
const _onClick = (): void => {
|
||||
if (disabled) return;
|
||||
onChange(!checked);
|
||||
|
@ -61,8 +61,6 @@ export default ({ checked, disabled = false, title, tooltip, onChange, ...props
|
|||
role="switch"
|
||||
aria-checked={checked}
|
||||
aria-disabled={disabled}
|
||||
title={title}
|
||||
tooltip={tooltip}
|
||||
>
|
||||
<div className="mx_ToggleSwitch_ball" />
|
||||
</AccessibleTooltipButton>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue