加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

带有YouTube视频的iframe – 辅助功能错误:通过ID引用其他元素

发布时间:2020-12-14 18:39:23 所属栏目:资源 来源:网络整理
导读:我有一个包含Youtube视频的iframe,如下所示: iframe src="//www.youtube.com/embed/my-video" width="225" height="150"/iframe 当我通过Chrome辅助功能审核运行网站时,我在iframe中收到以下错误: [Severe] ARIA attributes which refer to other elements
我有一个包含Youtube视频的iframe,如下所示:
<iframe src="//www.youtube.com/embed/my-video" width="225" height="150"></iframe>

当我通过Chrome辅助功能审核运行网站时,我在iframe中收到以下错误:

[Severe] ARIA attributes which refer to other elements by ID should refer to elements which exist in the DOM (3)
See AX_ARIA_02 for more information.

知道如何解决这个问题吗?

====更新

我注意到了其他错误:

[Severe] Controls and media elements should have labels
See AX_TEXT_01 for more information.
<video class=?"video-stream html5-main-video" style=?"width:? 225px;? height:? 150px;? left:? 0px;? top:? -150px;? transform:? none;?">?</video>?

[Severe] Elements with ARIA roles must ensure required owned elements are present (3)
See AX_ARIA_08 for more information.
<div class=?"ytp-playlist-menu-items" role=?"menu">?</div>?
<div class=?"ytp-related-menu-items" role=?"menu">?</div>?
<div class=?"ytp-menu" role=?"menu" id=?"ytp-main-menu-id">?</div>?

据推测,Youtube视频播放器不符合ARIA标准吗?

解决方法

尝试在iframe src的前面添加https:

这应该是你的代码:

<iframe src="https://www.youtube.com/embed/my-video" width="225" height="150"></iframe>

您的视频类型Chrome也可能不支持.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读