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 alternative text labels and help text #49416

Merged
merged 3 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 4 additions & 5 deletions packages/block-library/src/cover/edit/inspector-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ export default function CoverInspectorControls( {
isImgElement && (
<TextareaControl
__nextHasNoMarginBottom
label={ __(
'Alt text (alternative text)'
) }
label={ __( 'Alternative text' ) }
value={ alt }
onChange={ ( newAlt ) =>
setAttributes( { alt: newAlt } )
Expand All @@ -217,11 +215,12 @@ export default function CoverInspectorControls( {
<>
<ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
{ __(
'Describe the purpose of the image'
'Describe the purpose of the image.'
) }
</ExternalLink>
<br />
{ __(
'Leave empty if the image is purely decorative.'
'Leave empty if decorative.'
) }
</>
}
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ export class ImageEdit extends Component {
footerNote={
<>
{ __(
'Describe the purpose of the image. Leave empty if the image is purely decorative.'
'Describe the purpose of the image. Leave empty if decorative.'
) }{ ' ' }
<FooterMessageLink
href={
Expand Down
9 changes: 4 additions & 5 deletions packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,19 +407,18 @@ export default function Image( {
{ ! multiImageSelection && (
<TextareaControl
__nextHasNoMarginBottom
label={ __( 'Alt text (alternative text)' ) }
label={ __( 'Alternative text' ) }
value={ alt }
onChange={ updateAlt }
help={
<>
<ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
{ __(
'Describe the purpose of the image'
'Describe the purpose of the image.'
) }
</ExternalLink>
{ __(
'Leave empty if the image is purely decorative.'
) }
<br />
{ __( 'Leave empty if decorative.' ) }
</>
}
/>
Expand Down
9 changes: 4 additions & 5 deletions packages/block-library/src/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,17 +270,16 @@ function MediaTextEdit( { attributes, isSelected, setAttributes, clientId } ) {
{ mediaType === 'image' && (
<TextareaControl
__nextHasNoMarginBottom
label={ __( 'Alt text (alternative text)' ) }
label={ __( 'Alternative text' ) }
value={ mediaAlt }
onChange={ onMediaAltChange }
help={
<>
<ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
{ __( 'Describe the purpose of the image' ) }
{ __( 'Describe the purpose of the image.' ) }
</ExternalLink>
{ __(
'Leave empty if the image is purely decorative.'
) }
<br />
{ __( 'Leave empty if decorative.' ) }
</>
}
/>
Expand Down