From 4f9ef25629f3a77c7913dafc6a127125ba2352a9 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 3 May 2017 17:54:30 +0200 Subject: [PATCH 1/2] Add aria-pressed to the editor toolbar toggle buttons. --- editor/components/toolbar/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/components/toolbar/index.js b/editor/components/toolbar/index.js index 627d691c16c7a..f9196c570843f 100644 --- a/editor/components/toolbar/index.js +++ b/editor/components/toolbar/index.js @@ -28,7 +28,9 @@ function Toolbar( { controls } ) { } } className={ classNames( 'editor-toolbar__control', { 'is-active': control.isActive - } ) } /> + } ) } + aria-pressed={ control.isActive ? 'true' : 'false' } + /> ) ) } ); From 9cf620e7d90006279043c5ec7b76433855768eff Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 4 May 2017 09:08:03 +0200 Subject: [PATCH 2/2] Avoid unnecessary ternary. --- editor/components/toolbar/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/components/toolbar/index.js b/editor/components/toolbar/index.js index f9196c570843f..698372d463f0d 100644 --- a/editor/components/toolbar/index.js +++ b/editor/components/toolbar/index.js @@ -29,7 +29,7 @@ function Toolbar( { controls } ) { className={ classNames( 'editor-toolbar__control', { 'is-active': control.isActive } ) } - aria-pressed={ control.isActive ? 'true' : 'false' } + aria-pressed={ control.isActive } /> ) ) }