diff --git a/packages/edit-site/src/components/style-book/index.js b/packages/edit-site/src/components/style-book/index.js index 99881cc7627979..ed24e46743d628 100644 --- a/packages/edit-site/src/components/style-book/index.js +++ b/packages/edit-site/src/components/style-book/index.js @@ -531,11 +531,15 @@ const Example = ( { id, title, blocks, isSelected, onClick, content } ) => { 'is-disabled-example': !! disabledProps?.disabled, } ) } id={ id } - aria-label={ sprintf( - // translators: %s: Title of a block, e.g. Heading. - __( 'Open %s styles in Styles panel' ), - title - ) } + aria-label={ + !! onClick + ? sprintf( + // translators: %s: Title of a block, e.g. Heading. + __( 'Open %s styles in Styles panel' ), + title + ) + : undefined + } render={
} role={ !! onClick ? 'button' : null } onClick={ onClick }