Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Improve empty block text #11560

Merged
merged 8 commits into from Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/design/block-design.md
Expand Up @@ -97,7 +97,7 @@ The most basic unit of the editor. The paragraph block is a simple input field.

### Placeholder:

- Simple placeholder text that reads “Type text or press / to insert a block”. The placeholder disappears when the block is selected.
- Simple placeholder text that reads “Start writing or press / to insert a block”. The placeholder disappears when the block is selected.

### Selected state:

Expand Down
2 changes: 1 addition & 1 deletion lib/client-assets.php
Expand Up @@ -1626,7 +1626,7 @@ function gutenberg_editor_scripts_and_styles( $hook ) {
'disableCustomFontSizes' => get_theme_support( 'disable-custom-font-sizes' ),
'disablePostFormats' => ! current_theme_supports( 'post-formats' ),
'titlePlaceholder' => apply_filters( 'enter_title_here', __( 'Add title', 'gutenberg' ), $post ),
'bodyPlaceholder' => apply_filters( 'write_your_story', __( 'Type text or press “/” to insert a block', 'gutenberg' ), $post ),
'bodyPlaceholder' => apply_filters( 'write_your_story', __( 'Start writing or press “/” to insert a block', 'gutenberg' ), $post ),
'isRTL' => is_rtl(),
'autosaveInterval' => 10,
'maxUploadFileSize' => $max_upload_size,
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/paragraph/edit.js
Expand Up @@ -246,7 +246,7 @@ class ParagraphBlock extends Component {
onReplace={ this.onReplace }
onRemove={ () => onReplace( [] ) }
aria-label={ __( 'Empty block; type text or press the forward slash key to insert a block' ) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should "type text" be replaced with "start writing"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a screen reader I actually think "type text" is better than "start writing".

placeholder={ placeholder || __( 'Type text or press “/” to insert a block' ) }
placeholder={ placeholder || __( 'Start writing or press “/” to insert a block' ) }
/>
</Fragment>
);
Expand Down
Expand Up @@ -28,7 +28,7 @@ exports[`core/paragraph block edit matches snapshot 1`] = `
<p
class="editor-rich-text__tinymce wp-block-paragraph"
>
Type text or press “/” to insert a block
Start writing or press “/” to insert a block
</p>
</div>
</div>
Expand Down
Expand Up @@ -31,7 +31,7 @@ export function DefaultBlockAppender( {
return null;
}

const value = decodeEntities( placeholder ) || __( 'Type text or press “/” to insert a block' );
const value = decodeEntities( placeholder ) || __( 'Start writing or press “/” to insert a block' );

// The appender "button" is in-fact a text field so as to support
// transitions by WritingFlow occurring by arrow key press. WritingFlow
Expand Down
Expand Up @@ -20,7 +20,7 @@ exports[`DefaultBlockAppender should append a default block when input focused 1
readOnly={true}
role="button"
type="text"
value="Type text or press “/” to insert a block"
value="Start writing or press “/” to insert a block"
/>
<WithSelect(WithDispatch(InserterWithShortcuts)) />
<WithSelect(IfCondition(Inserter))
Expand All @@ -42,7 +42,7 @@ exports[`DefaultBlockAppender should match snapshot 1`] = `
readOnly={true}
role="button"
type="text"
value="Type text or press “/” to insert a block"
value="Start writing or press “/” to insert a block"
/>
<WithSelect(WithDispatch(InserterWithShortcuts)) />
<WithSelect(IfCondition(Inserter))
Expand Down