diff --git a/packages/gallery/src/components/item/itemView.js b/packages/gallery/src/components/item/itemView.js
index e40003620..7c89617a4 100644
--- a/packages/gallery/src/components/item/itemView.js
+++ b/packages/gallery/src/components/item/itemView.js
@@ -984,6 +984,7 @@ class ItemView extends React.Component {
const isItemWrapperEmpty =
options.titlePlacement !== GALLERY_CONSTS.placements.SHOW_ON_HOVER &&
!this.hasRequiredMediaUrl;
+ const itemAriaRole = this.getItemAriaRole();
const innerDiv = (
{
expect(item.props().role).to.eq('button');
driver.detach.proGallery();
});
- it('expect "role" to be "" when "itemClick" is "nothing"', async () => {
+ it('expect no "role" attribute when "itemClick" is "nothing"', async () => {
initialProps.options = mergeNestedObjects(initialProps.options, {
itemClick: 'nothing',
});
driver.mount.proGallery(initialProps);
await driver.update();
const item = driver.find.hook('item-container').at(3);
- expect(item.props().role).to.eq('');
+ expect(item.props()).to.not.have.property('role');
driver.detach.proGallery();
});
});