简体   繁体   English

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

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

I'm currently working at improving the accessibility of a site.我目前正在努力提高网站的可访问性。 I'm using the TotalValidator tool to check the accessibility issues there, and the icons on the我正在使用 TotalValidator 工具检查那里的可访问性问题,以及

The icons there use this format:那里的图标使用这种格式:

<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" />

I searched about this topic and this format seems to be correct, but the accessibility report throws:我搜索了这个主题,这个格式似乎是正确的,但可访问性报告抛出:

The 'sizes' attribute is not allowed here.此处不允许使用 'sizes' 属性。

Does anyone knows how I should replace it?有谁知道我应该如何更换它? Thank you!谢谢!

According to @Darek Kay, this documentation refers that:根据@Darek Kay 的说法, 该文档指的是:

The sizes attribute gives the sizes of icons for visual media. size 属性给出了视觉媒体图标的大小。 [...] The attribute must not be specified on link elements that do not have a rel attribute that specifies the icon keyword or the apple-touch-icon keyword. [...] 不能在没有指定 icon 关键字或 apple-touch-icon 关键字的 rel 属性的链接元素上指定该属性。

NOTE: The apple-touch-icon keyword is a registered extension to the predefined set of link types, but user agents are not required to support it in any way.注意:apple-touch-icon 关键字是预定义链接类型集的注册扩展,但用户代理不需要以任何方式支持它。

Thank you!谢谢!

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

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