Skip to content

Commit

Permalink
Better placeholder label
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 2, 2021
1 parent a5abfb7 commit e7ae886
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/block-editor/src/components/placeholder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
import { useConstrainedTabbing } from '@wordpress/compose';
import { Placeholder } from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';

/**
* Internal dependencies
Expand All @@ -20,7 +21,11 @@ import EmbeddedAdminContext from '../embedded-admin-context';
export default function IsolatedPlaceholder( props ) {
return (
<EmbeddedAdminContext
aria-label={ props.label }
aria-label={ sprintf(
/* translators: %s: what the placeholder is for */
__( 'Placeholder: %s' ),
props.label
) }
className="wp-block-editor-placeholder"
>
<Placeholder
Expand Down

0 comments on commit e7ae886

Please sign in to comment.