File tree Expand file tree Collapse file tree
packages/block-library/src/image Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,26 +262,6 @@ function ContentOnlyControls( {
262262 ) ;
263263}
264264
265- function getAltHelp ( { lockAltControls, lockAltControlsMessage } ) {
266- if ( lockAltControls ) {
267- return < > { lockAltControlsMessage } </ > ;
268- }
269- return (
270- < >
271- < ExternalLink
272- href = {
273- // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
274- __ (
275- 'https://www.w3.org/WAI/tutorials/images/decision-tree/'
276- )
277- }
278- >
279- { __ ( 'Describe the purpose of the image.' ) }
280- </ ExternalLink >
281- </ >
282- ) ;
283- }
284-
285265export default function Image ( {
286266 temporaryURL,
287267 isSideloading,
@@ -999,10 +979,24 @@ export default function Image( {
999979 value = { alt || '' }
1000980 onChange = { updateAlt }
1001981 readOnly = { lockAltControls }
1002- help = { getAltHelp ( {
1003- lockAltControls,
1004- lockAltControlsMessage,
1005- } ) }
982+ help = {
983+ lockAltControls ? (
984+ lockAltControlsMessage
985+ ) : (
986+ < ExternalLink
987+ href = {
988+ // translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
989+ __ (
990+ 'https://www.w3.org/WAI/tutorials/images/decision-tree/'
991+ )
992+ }
993+ >
994+ { __ (
995+ 'Describe the purpose of the image.'
996+ ) }
997+ </ ExternalLink >
998+ )
999+ }
10061000 />
10071001 </ ToolsPanelItem >
10081002 ) }
You can’t perform that action at this time.
0 commit comments