问题描述
我正在使用网站上的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 (将#修改为@)