如何创建仅具有 CSS 背景图像的可访问空标签,例如用于社交媒体链接。
因此唯一的 HTML 标签是:
<a class="social-link" href="https://mastodon.social"></a>
CSS 如下:
.social-link{
height:48px;
width:48px;
background-image: url("mastodon.png");
}
这里有类似的堆栈溢出问题,但它没有为这个问题提供具体的语法:HTML 可访问性,允许使用空元素吗?