如何解决为什么Google Chrome Lighthouse说我的AMP轮播列表项<li>不包含在<ul>或<ol>父元素中?
我正在使用网站上的AMP轮播组件来展示相关产品。
示例页面:https://www.bizzlibrary.com/Template/MW1XT/gdpr-bring-your-own-device-byod-policy/
当我运行Google Chrome Lighthouse时,它会为我们的每个模板页面报告以下内容
public static void countSentences(String text) {
char comma = ',';
char period = '.';
char Question = '?';
char ex = '!';
String text = "..,??!!";
long count = text.chars().filter(ch -> ch == comma ||ch == Question ||ch == period ).count();
}
在源代码视图中,一切看起来都很不错。所有"List items (<li>) are not contained within <ul> or <ol> parent elements."
都在<li>
之内。在检查元素时,我唯一注意到的是AMP添加了一个角色:
<ul>
它添加了<ul class="list-reset amp-carousel-slide amp-scrollable-carousel-slide" **role="listitem"** aria-hidden="false" style="scroll-snap-align: start; transform: translate(0px,0px); --content-transform:translate(0px,0px) !important;">
在Github上,我读到这些角色可能是问题:https://github.com/GoogleChrome/lighthouse/issues/9643
这是AMP轮播错误还是Chrome灯塔错误,还是网站上的编码错误?任何解决方案都将受到欢迎。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。