From c05645216d4a307bb22fc9ecc09f0207678c94a6 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 27 Mar 2019 19:10:22 +0100 Subject: [PATCH 1/3] Update the alt text description. --- packages/block-library/src/image/edit.js | 10 +++++++++- packages/block-library/src/media-text/edit.js | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/image/edit.js b/packages/block-library/src/image/edit.js index 51d2587591eda..8b96b43311450 100644 --- a/packages/block-library/src/image/edit.js +++ b/packages/block-library/src/image/edit.js @@ -28,6 +28,7 @@ import { ToggleControl, Toolbar, withNotices, + ExternalLink, } from '@wordpress/components'; import { compose } from '@wordpress/compose'; import { withSelect } from '@wordpress/data'; @@ -456,7 +457,14 @@ class ImageEdit extends Component { label={ __( 'Alt Text (Alternative Text)' ) } value={ alt } onChange={ this.updateAlt } - help={ __( 'Alternative text describes your image to people who can’t see it. Add a short description with its key details.' ) } + help={ + + + { __( 'Describe the purpose of the image' ) } + + { __( 'Leave empty if the image is purely decorative.' ) } + + } /> { ! isEmpty( imageSizeOptions ) && ( + + { __( 'Describe the purpose of the image' ) } + + { __( 'Leave empty if the image is purely decorative.' ) } + + } /> ) } ); From 590a18279ceb88706fdba5e02e2cfee2c1325e8a Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 28 Mar 2019 00:48:55 +0100 Subject: [PATCH 2/3] Make the links non-translatable. --- packages/block-library/src/image/edit.js | 2 +- packages/block-library/src/media-text/edit.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/image/edit.js b/packages/block-library/src/image/edit.js index 8b96b43311450..c6336b0350836 100644 --- a/packages/block-library/src/image/edit.js +++ b/packages/block-library/src/image/edit.js @@ -459,7 +459,7 @@ class ImageEdit extends Component { onChange={ this.updateAlt } help={ - + { __( 'Describe the purpose of the image' ) } { __( 'Leave empty if the image is purely decorative.' ) } diff --git a/packages/block-library/src/media-text/edit.js b/packages/block-library/src/media-text/edit.js index 309909d4aacfc..ccf77324a8ce8 100644 --- a/packages/block-library/src/media-text/edit.js +++ b/packages/block-library/src/media-text/edit.js @@ -173,7 +173,7 @@ class MediaTextEdit extends Component { onChange={ onMediaAltChange } help={ - + { __( 'Describe the purpose of the image' ) } { __( 'Leave empty if the image is purely decorative.' ) } From 55fa4f6f38d55ac3ced647bdf000684e5079c49b Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 28 Mar 2019 01:02:41 +0100 Subject: [PATCH 3/3] Update help prop documentation. --- packages/components/src/base-control/README.md | 2 +- packages/components/src/checkbox-control/README.md | 6 +++--- packages/components/src/radio-control/README.md | 4 ++-- packages/components/src/range-control/README.md | 4 ++-- packages/components/src/select-control/README.md | 8 ++++---- packages/components/src/text-control/README.md | 4 ++-- packages/components/src/textarea-control/README.md | 14 +++++++------- packages/components/src/toggle-control/README.md | 7 +++---- 8 files changed, 24 insertions(+), 25 deletions(-) diff --git a/packages/components/src/base-control/README.md b/packages/components/src/base-control/README.md index b79ee413e2190..67e4896c8abab 100644 --- a/packages/components/src/base-control/README.md +++ b/packages/components/src/base-control/README.md @@ -45,7 +45,7 @@ If this property is added, a label will be generated using label property as the If this property is added, a help text will be generated using help property as the content. -- Type: `String` +- Type: `String|WPElement` - Required: No ### className diff --git a/packages/components/src/checkbox-control/README.md b/packages/components/src/checkbox-control/README.md index 91b50a09b2d97..c011fd2c56fe1 100644 --- a/packages/components/src/checkbox-control/README.md +++ b/packages/components/src/checkbox-control/README.md @@ -60,7 +60,7 @@ import { withState } from '@wordpress/compose'; const MyCheckboxControl = withState( { isChecked: true, -} )( ( { isChecked, setState } ) => ( +} )( ( { isChecked, setState } ) => ( ( +} )( ( { option, setState } ) => ( ( +} )( ( { columns, setState } ) => ( ( + } )( ( { size, setState } ) => ( ( +} )( ( { className, setState } ) => ( ( + } )( ( { text, setState } ) => ( ( +} )( ( { hasFixedBackground, setState } ) => ( setState( ( state ) => ( { hasFixedBackground: ! state.hasFixedBackground } ) ) } /> @@ -37,7 +37,7 @@ If this property is added, a label will be generated using label property as the If this property is added, a help text will be generated using help property as the content. -- Type: `String` | `Function` +- Type: `String|WPElement` - Required: No ### checked @@ -61,4 +61,3 @@ The class that will be added with `components-base-control` and `components-togg Type: String Required: No -