From 3982ac2f6a94c91205dc5fde5c28ad37dd86204b Mon Sep 17 00:00:00 2001 From: Jorge Bernal Date: Mon, 6 May 2019 13:28:43 +0200 Subject: [PATCH 1/3] Improve accessibility on missing block --- .../block-library/src/missing/edit.native.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/missing/edit.native.js b/packages/block-library/src/missing/edit.native.js index 838c64d88b56c..dffe7cd3a1e32 100644 --- a/packages/block-library/src/missing/edit.native.js +++ b/packages/block-library/src/missing/edit.native.js @@ -10,7 +10,7 @@ import { Icon } from '@wordpress/components'; import { coreBlocks } from '@wordpress/block-library'; import { normalizeIconObject } from '@wordpress/blocks'; import { Component } from '@wordpress/element'; -import { __ } from '@wordpress/i18n'; +import { __, sprintf } from '@wordpress/i18n'; /** * Internal dependencies @@ -25,7 +25,20 @@ export default class UnsupportedBlockEdit extends Component { const icon = blockType ? normalizeIconObject( blockType.settings.icon ) : 'admin-plugins'; return ( - + { title } From 3b9fcf817d4fb45528d371a36e1b5acc2f570375 Mon Sep 17 00:00:00 2001 From: etoledom Date: Tue, 7 May 2019 09:25:04 +0200 Subject: [PATCH 2/3] Update packages/block-library/src/missing/edit.native.js Co-Authored-By: koke --- packages/block-library/src/missing/edit.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/missing/edit.native.js b/packages/block-library/src/missing/edit.native.js index dffe7cd3a1e32..f9c3914d9b510 100644 --- a/packages/block-library/src/missing/edit.native.js +++ b/packages/block-library/src/missing/edit.native.js @@ -31,7 +31,7 @@ export default class UnsupportedBlockEdit extends Component { blockType ? sprintf( /* translators: accessibility text. %s: unsupported block type. */ - __( 'Unsupported block: %s.' ), + __( 'Unsupported block: %s' ), title ) : /* translators: accessibility text. */ From 2887348dd6347783dee4ac8d9fba9324349a7af0 Mon Sep 17 00:00:00 2001 From: etoledom Date: Tue, 7 May 2019 09:25:20 +0200 Subject: [PATCH 3/3] Remove unnecessary dot for accessibility label Co-Authored-By: koke --- packages/block-library/src/missing/edit.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/missing/edit.native.js b/packages/block-library/src/missing/edit.native.js index f9c3914d9b510..970975aa71141 100644 --- a/packages/block-library/src/missing/edit.native.js +++ b/packages/block-library/src/missing/edit.native.js @@ -35,7 +35,7 @@ export default class UnsupportedBlockEdit extends Component { title ) : /* translators: accessibility text. */ - __( 'Unsupported block.' ) + __( 'Unsupported block' ) } onAccessibilityTap={ this.props.onFocus } >