Skip to content

Commit

Permalink
Update alternative text labels and help text (#49416)
Browse files Browse the repository at this point in the history
* Update alt text help text, add periods.

* Alt text (alternative text) -> Alternative text

* Add missing periods
  • Loading branch information
richtabor authored Mar 29, 2023
1 parent 8400eff commit 79b628e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
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

1 comment on commit 79b628e

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in 79b628e.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4555185491
📝 Reported issues:

Please sign in to comment.