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

Update the alt text description #14668

Merged
merged 3 commits into from
Mar 28, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/block-library/src/image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
ToggleControl,
Toolbar,
withNotices,
ExternalLink,
} from '@wordpress/components';
import { compose } from '@wordpress/compose';
import { withSelect } from '@wordpress/data';
Expand Down Expand Up @@ -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={
<Fragment>
<ExternalLink href={ __( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ) }>
Copy link
Member

Choose a reason for hiding this comment

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

Is it intended this link value be localized?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're planning to copy the W3C alt decision tree tutorial to the Handbook so it can be translated. But yes, can be non-translatable for now, will adjust.

{ __( 'Describe the purpose of the image' ) }
</ExternalLink>
{ __( 'Leave empty if the image is purely decorative.' ) }
</Fragment>
}
/>
{ ! isEmpty( imageSizeOptions ) && (
<SelectControl
Expand Down
10 changes: 9 additions & 1 deletion packages/block-library/src/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
TextareaControl,
ToggleControl,
Toolbar,
ExternalLink,
} from '@wordpress/components';
/**
* Internal dependencies
Expand Down Expand Up @@ -170,7 +171,14 @@ class MediaTextEdit extends Component {
label={ __( 'Alt Text (Alternative Text)' ) }
value={ mediaAlt }
onChange={ onMediaAltChange }
help={ __( 'Alternative text describes your image to people who can’t see it. Add a short description with its key details.' ) }
help={
<Fragment>
<ExternalLink href={ __( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ) }>
{ __( 'Describe the purpose of the image' ) }
</ExternalLink>
{ __( 'Leave empty if the image is purely decorative.' ) }
</Fragment>
}
/> ) }
</PanelBody>
);
Expand Down