Skip to content

Commit

Permalink
#673 Updating Image Box with aria-label on link
Browse files Browse the repository at this point in the history
Signed-off-by: James Hunt <[email protected]>
  • Loading branch information
thetwopct committed Mar 16, 2023
1 parent 5b9c9d2 commit 0bd57ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/wp-content/plugins/image-box/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '349b9f9982f31a38f426cbb8b74ed7c6');
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '2a86bee0bafb9ad6795a005e09f233a9');
2 changes: 1 addition & 1 deletion web/wp-content/plugins/image-box/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions web/wp-content/plugins/image-box/src/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function save( { attributes } ) {

const blockProps = useBlockProps.save();

let altText = typeof title === 'string' ? title.replace(/(<([^>]+)>)/gi, '') : 'Find out more';
let ariaText = typeof title === 'string' ? title.replace(/(<([^>]+)>)/gi, '') : 'Find out more';

return (
<div
Expand All @@ -57,7 +57,7 @@ export default function save( { attributes } ) {
>
{ link && (
<a
alt={ altText }
aria-label={ ariaText }
className="box-link"
href={ link }
{ ...( newWindow ? { target: '_blank' } : {} ) }
Expand Down

0 comments on commit 0bd57ad

Please sign in to comment.