diff --git a/CHANGELOG.md b/CHANGELOG.md index 51dc1042ec4..ed002dad189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added aria-live labeling for `EuiToasts` ([#777](https://github.com/elastic/eui/pull/777)) - Added aria labeling requirements for `EuiBadge` , as well as a generic prop_type function `requiresAriaLabel` in `utils` to check for it. ([#777](https://github.com/elastic/eui/pull/777)) +- Ensure switches’ inputs are still hidden when `[disabled]` ([#778](https://github.com/elastic/eui/pull/778)) ## [`0.0.46`](https://github.com/elastic/eui/tree/v0.0.46) diff --git a/src/components/form/switch/_switch.scss b/src/components/form/switch/_switch.scss index d22070a161b..2fd3a978684 100644 --- a/src/components/form/switch/_switch.scss +++ b/src/components/form/switch/_switch.scss @@ -12,8 +12,10 @@ /** * 1. The input is "hidden" but still focusable. + * 2. Make sure it's still hidden when [disabled]. */ - .euiSwitch__input { + .euiSwitch__input, + .euiSwitch__input[disabled] /* 2 */ { position: absolute; opacity: 0; /* 1 */ width: 100%;