Skip to content

fix: remove dialog close button warning for prop-based dialogs#2228

Merged
frankensteinke merged 2 commits intodevelopfrom
fix-close-button-warning
Feb 6, 2026
Merged

fix: remove dialog close button warning for prop-based dialogs#2228
frankensteinke merged 2 commits intodevelopfrom
fix-close-button-warning

Conversation

@frankensteinke
Copy link
Contributor

Related: https://github.com/dequelabs/axe-extension/issues/7457

<DialogCloseButton> will emit a warning whenever a prop-based modal is created with forceAction set to true. The warning is still helpful if the user creates a compound header and doesn't include a close button, but this update will get rid of the warning in all other cases.

@frankensteinke frankensteinke requested a review from a team as a code owner February 4, 2026 11:44
Copilot AI review requested due to automatic review settings February 4, 2026 11:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a warning that was incorrectly appearing for prop-based dialogs when forceAction is set to true. The warning in DialogCloseButton is intended to alert developers when they manually include a close button in a custom header while also setting forceAction to true, but it was triggering for prop-based dialogs where the close button is automatically rendered.

Changes:

  • Conditionally render the DialogCloseButton based on the forceAction prop to prevent the warning from appearing in prop-based dialogs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2228.d15792l1n26ww3.amplifyapp.com

@frankensteinke frankensteinke changed the title fix: dialog close button warning shows up for prop-based dialogs fix: remove dialog close button warning for prop-based dialogs Feb 4, 2026
@frankensteinke frankensteinke merged commit e96faec into develop Feb 6, 2026
8 checks passed
@frankensteinke frankensteinke deleted the fix-close-button-warning branch February 6, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants