diff --git a/app/soapbox/components/__tests__/__snapshots__/column_back_button-test.js.snap b/app/soapbox/components/__tests__/__snapshots__/column_back_button-test.js.snap index b7fb5b8b3..11cf66e96 100644 --- a/app/soapbox/components/__tests__/__snapshots__/column_back_button-test.js.snap +++ b/app/soapbox/components/__tests__/__snapshots__/column_back_button-test.js.snap @@ -4,6 +4,7 @@ exports[` renders correctly 1`] = ` diff --git a/app/soapbox/components/column_back_button_slim.js b/app/soapbox/components/column_back_button_slim.js index 0edec7de4..70f4081df 100644 --- a/app/soapbox/components/column_back_button_slim.js +++ b/app/soapbox/components/column_back_button_slim.js @@ -8,7 +8,7 @@ export default class ColumnBackButtonSlim extends ColumnBackButton { render() { return (
-
+
diff --git a/app/soapbox/components/icon_button.js b/app/soapbox/components/icon_button.js index 949f4e5b4..21ed4ca95 100644 --- a/app/soapbox/components/icon_button.js +++ b/app/soapbox/components/icon_button.js @@ -13,6 +13,8 @@ export default class IconButton extends React.PureComponent { title: PropTypes.string.isRequired, icon: PropTypes.string.isRequired, onClick: PropTypes.func, + onKeyUp: PropTypes.func, + onKeyDown: PropTypes.func, onMouseEnter: PropTypes.func, onMouseLeave: PropTypes.func, size: PropTypes.number, @@ -37,6 +39,8 @@ export default class IconButton extends React.PureComponent { animate: false, overlay: false, tabIndex: '0', + onKeyUp: () => {}, + onKeyDown: () => {}, onClick: () => {}, onMouseEnter: () => {}, onMouseLeave: () => {}, @@ -94,6 +98,8 @@ export default class IconButton extends React.PureComponent { title={title} className={classes} onClick={this.handleClick} + onKeyUp={this.props.onKeyUp} + onKeyDown={this.props.onKeyDown} onMouseEnter={this.props.onMouseEnter} onMouseLeave={this.props.onMouseLeave} tabIndex={tabIndex} @@ -119,6 +125,8 @@ export default class IconButton extends React.PureComponent { title={title} className={classes} onClick={this.handleClick} + onKeyUp={this.props.onKeyUp} + onKeyDown={this.props.onKeyDown} onMouseEnter={this.props.onMouseEnter} onMouseLeave={this.props.onMouseLeave} tabIndex={tabIndex} diff --git a/app/styles/components/columns.scss b/app/styles/components/columns.scss index 0beae81af..075686ad1 100644 --- a/app/styles/components/columns.scss +++ b/app/styles/components/columns.scss @@ -217,7 +217,8 @@ z-index: 3; outline: 0; - &:hover { + &:hover, + &:focus { text-decoration: underline; } } diff --git a/app/styles/components/promo-panel.scss b/app/styles/components/promo-panel.scss index 78625e338..e6e97a047 100644 --- a/app/styles/components/promo-panel.scss +++ b/app/styles/components/promo-panel.scss @@ -20,7 +20,8 @@ border-bottom: 0; } - &:hover { + &:hover, + &:focus { color: var(--primary-text-color--faint); span { diff --git a/app/styles/components/react-toggle.scss b/app/styles/components/react-toggle.scss index e2be2ef14..5a72c3b2d 100644 --- a/app/styles/components/react-toggle.scss +++ b/app/styles/components/react-toggle.scss @@ -36,7 +36,9 @@ transition: background-color 0.2s ease; } -.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track { +.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track, +.react-toggle.react-toggle--focus:not(.react-toggle--disabled) .react-toggle-track, +.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track { background-color: var(--brand-color--hicontrast); } @@ -44,10 +46,6 @@ background-color: var(--brand-color); } -.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track { - background-color: var(--brand-color--hicontrast); -} - .react-toggle-track-check { position: absolute; width: 14px; diff --git a/app/styles/components/status.scss b/app/styles/components/status.scss index c3a975bee..8c640e4d1 100644 --- a/app/styles/components/status.scss +++ b/app/styles/components/status.scss @@ -434,7 +434,8 @@ background: var(--brand-color--med); transition: 0.2s; - &:hover { + &:hover, + &:focus { background: hsla(var(--brand-color_hsl), 0.5); text-decoration: none; } diff --git a/app/styles/components/tabs-bar.scss b/app/styles/components/tabs-bar.scss index 905533630..69ac2d301 100644 --- a/app/styles/components/tabs-bar.scss +++ b/app/styles/components/tabs-bar.scss @@ -152,7 +152,8 @@ background-color: var(--accent-color); } - &:hover:not(.react-toggle--disabled) .react-toggle-track { + &:hover:not(.react-toggle--disabled) .react-toggle-track, + &.react-toggle--focus .react-toggle-track { background-color: var(--accent-color--bright); } } @@ -250,7 +251,8 @@ } &.active::before, - &:hover::before { + &:hover::before, + &:focus::before { height: 30px; opacity: 1; diff --git a/app/styles/forms.scss b/app/styles/forms.scss index 994cd1564..1182794f3 100644 --- a/app/styles/forms.scss +++ b/app/styles/forms.scss @@ -479,6 +479,10 @@ code { position: relative; margin-top: 8px; cursor: pointer; + + &:focus { + background: var(--accent-color--faint); + } } .select-wrapper {