From cd476fdaf151d527031c53a6d2359e0f40b2c643 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 30 Oct 2024 18:46:44 +0400 Subject: [PATCH] DataViews: Fix 'aria-label' for pattern preview element (#66601) Co-authored-by: Mamaduka Co-authored-by: t-hamano Co-authored-by: kmanijak --- packages/edit-site/src/components/page-patterns/fields.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/page-patterns/fields.js b/packages/edit-site/src/components/page-patterns/fields.js index 88de0c1fa39b0..74433b3de72f0 100644 --- a/packages/edit-site/src/components/page-patterns/fields.js +++ b/packages/edit-site/src/components/page-patterns/fields.js @@ -45,7 +45,7 @@ function PreviewWrapper( { item, onClick, ariaDescribedBy, children } ) { className="page-patterns-preview-field__button" type="button" onClick={ item.type !== PATTERN_TYPES.theme ? onClick : undefined } - aria-label={ item.title } + aria-label={ defaultGetTitle( item ) } aria-describedby={ ariaDescribedBy } aria-disabled={ item.type === PATTERN_TYPES.theme } >