diff --git a/.changeset/tricky-hats-bake.md b/.changeset/tricky-hats-bake.md new file mode 100644 index 000000000..891b1dea3 --- /dev/null +++ b/.changeset/tricky-hats-bake.md @@ -0,0 +1,5 @@ +--- +"@ebay/skin": minor +--- + +fix(button): update focus outline and offset diff --git a/dist/button/button.css b/dist/button/button.css index 3878c9a3b..acfc92191 100644 --- a/dist/button/button.css +++ b/dist/button/button.css @@ -22,6 +22,12 @@ button.btn--fixed-height, button.btn--truncated { height: 40px; } +a.fake-btn:focus-visible, +button.btn:focus-visible { + outline-offset: var(--spacing-25); + outline-style: solid; + outline-width: var(--spacing-25); +} a.fake-btn:focus:not(:focus-visible), button.btn:focus:not(:focus-visible) { outline: none; diff --git a/dist/cta-button/cta-button.css b/dist/cta-button/cta-button.css index eb90c260a..de648faeb 100644 --- a/dist/cta-button/cta-button.css +++ b/dist/cta-button/cta-button.css @@ -21,6 +21,11 @@ a.cta-btn--fixed-height, a.cta-btn--truncated { height: 40px; } +a.cta-btn:focus-visible { + outline-offset: var(--spacing-25); + outline-style: solid; + outline-width: var(--spacing-25); +} a.cta-btn:focus:not(:focus-visible) { outline: none; } diff --git a/src/sass/mixins/private/_button-mixins.scss b/src/sass/mixins/private/_button-mixins.scss index 943beb1bc..dc3235441 100644 --- a/src/sass/mixins/private/_button-mixins.scss +++ b/src/sass/mixins/private/_button-mixins.scss @@ -28,6 +28,12 @@ $button-border-radius-large: 24px; height: 40px; } + &:focus-visible { + outline-offset: var(--spacing-25); + outline-style: solid; + outline-width: var(--spacing-25); + } + /* https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/ */ &:focus:not(:focus-visible) { outline: none;