From 4795e31f083ce29ceb1423a503c179a787af4e90 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Wed, 5 Jul 2023 09:25:48 +0800 Subject: [PATCH] Fix incorrect aria-describedby attributes for theme patterns (#52263) --- .../edit-site/src/components/page-patterns/grid-item.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/page-patterns/grid-item.js b/packages/edit-site/src/components/page-patterns/grid-item.js index 377a04aca1c16..7db14e1d37788 100644 --- a/packages/edit-site/src/components/page-patterns/grid-item.js +++ b/packages/edit-site/src/components/page-patterns/grid-item.js @@ -122,7 +122,12 @@ export default function GridItem( { categoryId, composite, icon, item } ) { aria-label={ item.title } aria-describedby={ ariaDescriptions.length - ? ariaDescriptions.join( ' ' ) + ? ariaDescriptions + .map( + ( _, index ) => + `${ descriptionId }-${ index }` + ) + .join( ' ' ) : undefined } >