Put aria-disabled on AccessibleButtons and attempt to a11y ToggleSwitch

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2019-09-25 09:01:49 +01:00
parent 351a3ebd67
commit 4a5ee4a969
2 changed files with 8 additions and 3 deletions

View file

@ -69,8 +69,7 @@ export default function AccessibleButton(props) {
restProps.tabIndex = restProps.tabIndex || "0";
restProps.role = "button";
restProps.className = (restProps.className ? restProps.className + " " : "") +
"mx_AccessibleButton";
restProps.className = (restProps.className ? restProps.className + " " : "") + "mx_AccessibleButton";
if (kind) {
// We apply a hasKind class to maintain backwards compatibility with
@ -80,6 +79,7 @@ export default function AccessibleButton(props) {
if (disabled) {
restProps.className += " mx_AccessibleButton_disabled";
restProps["aria-disabled"] = true;
}
return React.createElement(element, restProps, children);