diff --git a/packages/react-core/src/components/Wizard/WizardHeader.tsx b/packages/react-core/src/components/Wizard/WizardHeader.tsx index b197e6faa86..5fc3799aab2 100644 --- a/packages/react-core/src/components/Wizard/WizardHeader.tsx +++ b/packages/react-core/src/components/Wizard/WizardHeader.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import styles from '@patternfly/react-styles/css/components/Wizard/wizard'; import { css } from '@patternfly/react-styles'; import { Button } from '../Button'; -import { Title } from '../Title'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; export interface WizardHeaderProps { @@ -31,19 +30,20 @@ export const WizardHeader: React.FunctionComponent = ({ isCloseHidden, closeButtonAriaLabel, titleId, - descriptionComponent: Component = 'p', + descriptionComponent: Component = 'div', descriptionId }: WizardHeaderProps) => (
{!isCloseHidden && ( - +
+ +
)} - - - {title || <> </>} - +
+

{title || <> }

+
{description && ( diff --git a/packages/react-core/src/deprecated/components/Wizard/WizardHeader.tsx b/packages/react-core/src/deprecated/components/Wizard/WizardHeader.tsx index a41307fcb4f..374b4d1e021 100644 --- a/packages/react-core/src/deprecated/components/Wizard/WizardHeader.tsx +++ b/packages/react-core/src/deprecated/components/Wizard/WizardHeader.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import styles from '@patternfly/react-styles/css/components/Wizard/wizard'; import { css } from '@patternfly/react-styles'; import { Button } from '../../../components/Button'; -import { Title } from '../../../components/Title'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; export interface WizardHeaderProps { @@ -31,18 +30,20 @@ export const WizardHeader: React.FunctionComponent = ({ hideClose, closeButtonAriaLabel, titleId, - descriptionComponent: Component = 'p', + descriptionComponent: Component = 'div', descriptionId }: WizardHeaderProps) => (
{!hideClose && ( - +
+ +
)} - - {title || <> </>} - +
+

{title || <> }

+
{description && ( {description} diff --git a/packages/react-core/src/deprecated/components/Wizard/__tests__/Generated/__snapshots__/WizardHeader.test.tsx.snap b/packages/react-core/src/deprecated/components/Wizard/__tests__/Generated/__snapshots__/WizardHeader.test.tsx.snap index 90195641ea6..75eb2b39e36 100644 --- a/packages/react-core/src/deprecated/components/Wizard/__tests__/Generated/__snapshots__/WizardHeader.test.tsx.snap +++ b/packages/react-core/src/deprecated/components/Wizard/__tests__/Generated/__snapshots__/WizardHeader.test.tsx.snap @@ -5,24 +5,24 @@ exports[`WizardHeader should match snapshot (auto-generated) 1`] = `
-

- string -

-

+ string + +

+
-
- ReactNode + > +
+ ReactNode +
-

`; diff --git a/packages/react-core/src/deprecated/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap b/packages/react-core/src/deprecated/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap index c7146b126cb..e0351bde263 100644 --- a/packages/react-core/src/deprecated/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap +++ b/packages/react-core/src/deprecated/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap @@ -8,37 +8,41 @@ exports[`Wizard Expandable Nav Wizard should match snapshot 1`] = `
- -
+
- Wizard title - +

+ Wizard title +

+

- -

+
- Wizard title - +

+ Wizard title +

+

{ it('Verify wizard in modal sends focus to the new content', () => { cy.get('#launchWiz').click(); cy.get('#modalWizId.pf-v5-c-wizard').should('exist'); - cy.focused().should('have.class', 'pf-v5-c-wizard__close'); + cy.focused().should('have.class', 'pf-v5-c-button'); cy.focused().click(); }); diff --git a/packages/react-integration/cypress/integration/wizarddeprecated.spec.ts b/packages/react-integration/cypress/integration/wizarddeprecated.spec.ts index 07d831fed44..75c0d7ec77c 100644 --- a/packages/react-integration/cypress/integration/wizarddeprecated.spec.ts +++ b/packages/react-integration/cypress/integration/wizarddeprecated.spec.ts @@ -13,7 +13,7 @@ describe('Wizard Deprecated Demo Test', () => { it('Verify wizard in modal sends focus to the new content', () => { cy.get('#launchWiz').click(); cy.get('#modalWizId.pf-v5-c-wizard').should('exist'); - cy.focused().should('have.class', 'pf-v5-c-wizard__close'); + cy.focused().should('have.class', 'pf-v5-c-button'); cy.focused().click(); }); @@ -38,6 +38,6 @@ describe('Wizard Deprecated Demo Test', () => { cy.get('#wizard-correct-role .pf-v5-c-wizard__main button').click(); // Within a modal, wizard body uses the

element and should not have a role applied cy.get('#wizard-correct-role .pf-v5-c-wizard__main').should('not.have.attr', 'role'); - cy.get('#wizard-correct-role .pf-v5-c-wizard__close').click(); + cy.get('#wizard-correct-role .pf-v5-c-wizard__close button').click(); }); });