Consider this modal example (and a lot of other examples from them): https://www.w3schools.com/howto/howto_css_modals.asp
They use a span tag, that acts as a close button for the modal. Isn't this semantically incorrect? Or is there some legitimisation to do that?
It is kind of weird that the "web standardization consortium" is putting out examples like that. But maybe I am missing something here