繁体   English   中英

HTML - 图标和 apple-touch-icon 中的可访问性

[英]HTML - Accessibility in icons and apple-touch-icon

我目前正在努力提高网站的可访问性。 我正在使用 TotalValidator 工具检查那里的可访问性问题,以及

那里的图标使用这种格式:

<link href="/full/path/to/the/image/120.png" rel="apple-touch-icon" />
<link href="/full/path/to/the/image/152.png" rel="apple-touch-icon" sizes="152x152" />
<link href="/full/path/to/the/image/167.png" rel="apple-touch-icon" sizes="167x167" />
<link href="/full/path/to/the/image/180.png" rel="apple-touch-icon" sizes="180x180" />
<link href="/full/path/to/the/image/192.png" rel="icon" sizes="192x192" />
<link href="/full/path/to/the/image/128.png" rel="icon" sizes="128x128" />

我搜索了这个主题,这个格式似乎是正确的,但可访问性报告抛出:

此处不允许使用 'sizes' 属性。

有谁知道我应该如何更换它? 谢谢!

根据@Darek Kay 的说法, 该文档指的是:

size 属性给出了视觉媒体图标的大小。 [...] 不能在没有指定 icon 关键字或 apple-touch-icon 关键字的 rel 属性的链接元素上指定该属性。

注意:apple-touch-icon 关键字是预定义链接类型集的注册扩展,但用户代理不需要以任何方式支持它。

谢谢!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM