diff --git a/packages/main/src/components/ObjectStatus/ObjectStatus.cy.tsx b/packages/main/src/components/ObjectStatus/ObjectStatus.cy.tsx index 4bec04c3abf..8e517c983e0 100644 --- a/packages/main/src/components/ObjectStatus/ObjectStatus.cy.tsx +++ b/packages/main/src/components/ObjectStatus/ObjectStatus.cy.tsx @@ -238,7 +238,7 @@ describe('ObjectStatus', () => { cy.findByText('Object Status').should('exist').and('have.css', 'font-size', '0px'); cy.mount( - + Content ); @@ -249,7 +249,7 @@ describe('ObjectStatus', () => { cy.get('@clickSpy').should('have.been.calledTwice'); cy.findByText('Content').realPress('Space'); cy.get('@clickSpy').should('have.been.calledThrice'); - cy.findByText('Object Status Button').should('exist').and('have.css', 'font-size', '0px'); + cy.findByTestId('os').should('have.attr', 'aria-roledescription', 'Object Status Button'); }); it('emptyIndicator', () => { diff --git a/packages/main/src/components/ObjectStatus/index.tsx b/packages/main/src/components/ObjectStatus/index.tsx index 88428c1b8b9..74c16b6c132 100644 --- a/packages/main/src/components/ObjectStatus/index.tsx +++ b/packages/main/src/components/ObjectStatus/index.tsx @@ -170,6 +170,7 @@ const ObjectStatus = forwardRef - - {interactive ? i18nBundle.getText(ARIA_OBJ_STATUS_DESC) : i18nBundle.getText(ARIA_OBJ_STATUS_DESC_INACTIVE)} - + {!interactive && ( + + {i18nBundle.getText(ARIA_OBJ_STATUS_DESC_INACTIVE)} + + )} {iconToRender && ( {iconToRender}