Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Dec 10, 2024
1 parent 7e64926 commit 1369e5f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/dataviews/src/dataviews-layouts/grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,18 @@ function GridItem< Item >( {
let mediaA11yProps;
let titleA11yProps;
if ( isItemClickable( item ) && onClickItem ) {
mediaA11yProps = renderedTitleField
? {
'aria-labelledby': `dataviews-view-grid__title-field-${ instanceId }`,
}
: {
'aria-label': __( 'Navigate to item' ),
};
titleA11yProps = {
id: `dataviews-view-grid__title-field-${ instanceId }`,
};
if ( renderedTitleField ) {
mediaA11yProps = {
'aria-labelledby': `dataviews-view-grid__title-field-${ instanceId }`,
};
titleA11yProps = {
id: `dataviews-view-grid__title-field-${ instanceId }`,
};
} else {
mediaA11yProps = {
'aria-label': __( 'Navigate to item' ),
};
}
}

return (
Expand Down

0 comments on commit 1369e5f

Please sign in to comment.