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 (a11y): add parent node check when removing existing aria describe #19951

Merged
merged 4 commits into from Jul 28, 2020

Conversation

HELiving
Copy link
Contributor

@HELiving HELiving commented Jul 12, 2020

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla label Jul 12, 2020
@HELiving
Copy link
Contributor Author

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.

What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes PR author has agreed to Google's Contributor License Agreement and removed cla: no PR author must sign Google's Contributor License Agreement: https://opensource.google.com/docs/cla labels Jul 12, 2020
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM.

Commit message fixup: should be changed to something like fix(a11y): add parent node check when removing existing aria describer container.

@crisbeto crisbeto added lgtm action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed labels Jul 12, 2020
@HELiving HELiving changed the title added a null guard fix (a11y): add parent node check when removing existing aria describe Jul 12, 2020
@HELiving
Copy link
Contributor Author

LGTM.

Commit message fixup: should be changed to something like fix(a11y): add parent node check when removing existing aria describer container.

browser stack failures are there, but they seem unrelated. Is this still merge-able with browser stack failure?

@crisbeto
Copy link
Member

Looks like a flake. I've restarted it.

@crisbeto crisbeto removed the merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed label Jul 12, 2020
@HELiving
Copy link
Contributor Author

Looks like a flake. I've restarted it.

It's still happening I think. Not sure how to debug that particular area.

@HELiving
Copy link
Contributor Author

@jelbourn @devversion bump

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM. It's super surprising to me that the parent node is undefined (given we retrieved it from the document), but as noted in the issue, it shouldn't hurt having this check.

@jelbourn jelbourn added the merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed label Jul 14, 2020
Comment on lines +162 to +163
if (preExistingContainer && preExistingContainer.parentNode) {
preExistingContainer.parentNode.removeChild(preExistingContainer);
Copy link
Member

Choose a reason for hiding this comment

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

Could this just be

preExistingContainer?.parentNode?.removeChild(preExistingContainer);

@HELiving
Copy link
Contributor Author

HELiving commented Jul 14, 2020 via email

@HELiving
Copy link
Contributor Author

I think its a stylistic preference. Sure feel free to make any updates :)

On Tue, Jul 14, 2020 at 12:17 PM Jeremy Elbourn @.> wrote: @.* commented on this pull request. ------------------------------ In src/cdk/a11y/aria-describer/aria-describer.ts <#19951 (comment)>: > + if (preExistingContainer && preExistingContainer.parentNode) { + preExistingContainer.parentNode.removeChild(preExistingContainer); Could this just be preExistingContainer?.parentNode?.removeChild(preExistingContainer); — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#19951 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQICDMDFVPYHM2RRFU2GCELR3SAH7ANCNFSM4OX43RQA .

@jelbourn bump

@jelbourn
Copy link
Member

This PR has "merge ready", which means it's in the queue to be merged (it's not always fast because there are extra hoops to have to do with every PR to make sure they don't break anything inside Google)

@HELiving
Copy link
Contributor Author

HELiving commented Jul 21, 2020 via email

@wagnermaciel
Copy link
Contributor

@jelbourn This PR is passing presubmits but I couldn't merge it for the sync because it conflicts with 10.1.x

@jelbourn jelbourn added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Jul 28, 2020
@jelbourn jelbourn merged commit 16a3730 into angular:master Jul 28, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement merge: fix commit message When the PR is merged, rewrites/fixups of the commit messages are needed P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants