Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(modal): fall back to modal id for dialog aria-labelledby attribute (backport to 16.x) #1407

Merged
merged 1 commit into from
May 29, 2024

Conversation

github-actions[bot]
Copy link
Contributor

Backport 6493dc3 from #1403.
## PR Checklist

  • Tests for the changes have been added (for bug fixes / features)
  • [N/A] Docs have been added / updated (for bug fixes / features)
  • [N/A] If applicable, have a visual design approval

PR Type

Bugfix

What is the current behavior?

If you set [clrModalLabelledById] to an empty string, the aria-labelledby attribute of the modal dialog element is set to an empty value.

This behavior can be seen in the modal stories since the input is defaulted to an empty string. We can't default it to the modal id because that is not known until the component is instantiated.

Issue Number: CDE-2050

What is the new behavior?

If you set [clrModalLabelledById] to an empty string, the aria-labelledby attribute of the modal dialog element is set to the modal id.

Does this PR introduce a breaking change?

No.

…ute (#1403)

If you set `[clrModalLabelledById]` to an empty string, the
`aria-labelledby` attribute of the modal dialog element is set to an
empty value.

This behavior can be seen in the modal stories since the input is
defaulted to an empty string. We can't default it to the modal id
because that is not known until the component is instantiated.

Issue Number: CDE-2050

If you set `[clrModalLabelledById]` to an empty string, the
`aria-labelledby` attribute of the modal dialog element is set to the
modal id.

 (cherry picked from commit 6493dc3)
Copy link
Contributor Author

github-actions bot commented May 29, 2024

👋 @Jinnie,

  • 🙏 The Clarity team thanks you for opening a pull request
  • 🎉 The build for this PR has succeeded
  • 🔍 The PR is now ready for review
  • 🍿 In the meantime, view a preview of this PR
  • 🖐 You can always follow up here. If you're a VMware employee, you can also reach us on our internal Clarity Support space

Thank you,

🤖 Clarity Release Bot

@Jinnie
Copy link
Contributor

Jinnie commented May 29, 2024

Had to force-push a minor whitespace change in commit message to retrigger stuck build jobs

@Jinnie Jinnie merged commit c753b15 into 16.x May 29, 2024
7 checks passed
@Jinnie Jinnie deleted the backport-1403-to-16.x branch May 29, 2024 10:28
Copy link
Contributor Author

🎉 This PR is included in version 16.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Contributor Author

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed PRs after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants