Just add the display:contents for <a> tag.
.my-alert {
display: flex;
}
.my-alert a {
display: contents;
}
..children of a flex container are forced to have a block-flavored display type.
Source:<span>element refuses to go inline in flexbox