-
Notifications
You must be signed in to change notification settings - Fork 578
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
bug: ensure Announce components work without pre-existing text node #5568
Conversation
…nnounce without pre-existing text.
🦋 Changeset detectedLatest commit: 83be114 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rerun debug run none
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
Remaining TODOs:
relates to: #5566, https://github.com/github/accessibility-audits/issues/10031, https://github.com/github/accessibility-audits/issues/10017
Right now, announcements are not being triggered when the announce components (
Announcement
,AriaStatus
,AriaAlert
) go from being empty, to having text. See linked issue for broken examples.The announcements do work in instances where these components have pre-existing text that gets updated.
Upon placing a debugger, I noticed we're not hitting the MutationObserver's callback in the failing scenario (where we go from empty to no text). This is because we need to set
childList: true
to detect when text nodes are added/removed. The current config,subtree: true
andcharacterData: true
, will only detect when existing text nodes are updated.Changelog
Changed
Announce
,AriaAlert
,AriaStatus
without pre-existing text.Rollout strategy
Testing & Reviewing
Merge checklist