From 2cc16eab9312b92537eec0994fd28578c9643cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Thu, 4 Apr 2019 09:59:35 +0200 Subject: [PATCH] Make image selected onFocus --- packages/block-library/src/gallery/editor.scss | 1 - packages/block-library/src/gallery/gallery-image.js | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/gallery/editor.scss b/packages/block-library/src/gallery/editor.scss index 4136018059e499..3232b5c37a13ea 100644 --- a/packages/block-library/src/gallery/editor.scss +++ b/packages/block-library/src/gallery/editor.scss @@ -12,7 +12,6 @@ ul.wp-block-gallery li { outline: none; } - img:focus, .is-selected { outline: 4px solid theme(primary); } diff --git a/packages/block-library/src/gallery/gallery-image.js b/packages/block-library/src/gallery/gallery-image.js index de187969265002..1d4936d67e02b1 100644 --- a/packages/block-library/src/gallery/gallery-image.js +++ b/packages/block-library/src/gallery/gallery-image.js @@ -109,8 +109,9 @@ class GalleryImage extends Component { alt={ alt } data-id={ id } onClick={ this.onImageClick } - tabIndex="0" + onFocus={ this.onImageClick } onKeyDown={ this.onImageClick } + tabIndex="0" aria-label={ ariaLabel } /> { isBlobURL( url ) && }