How can you make an HTML link?
The HTML attribute removal was documented in change record #2932803, but the example uses the now deprecated SafeMarkup::format function. The FormattableMarkup class allows a non-deprecated way to do this. The API page has some good examples such as below:

Remember that this is has security implications, and to only use FormattableMarkup when you absolutely need it with strict placeholders.

$value = FormattableMarkup::placeholderFormat('&lt;a href=":url"&gt;@variable&lt;/a&gt;', [':url' =&gt; $url, @variable =&gt; $variable]);


There's probably a better way to do this without printing the anchor element and href attribute yourself.