Use closest `.alert` for alert dismissal; closes #14306
Merge pull request #14316 from hnrch02/use-closest-alert

Use closest `.alert` for alert dismissal; closes #14306