iframe 导致重复的地标角色

iframe causing duplicate landmark roles

我的任务是制作一个网站,以便 AInspector 边栏评估至少没有 WAI ARIA 违规(最好也没有警告)。

有一个页面包含嵌入的 Vimeo 视频。 iframe 引入的代码中包含一个具有地标角色“contentinfo”的元素,我已经在网站页面的适当位置使用了它。所以现在我有一个重复地标角色的违规行为。

有什么好的方法可以解决吗?我想我可以使用 Vimeo 提供的“旧嵌入代码”,但我宁愿尽可能避免使用它。我到处搜索,但找不到针对这种情况的任何指南或最佳实践。也许我没有使用正确的术语?

http://www.w3.org/TR/wai-aria/roles#contentinfo

虽然规范确实说

"Within any document or application, the author SHOULD mark no more than one element with the contentinfo role."

它还说

"Note: Because document and application elements can be nested in the DOM, they may have multiple contentinfo elements as DOM descendants, assuming each of those is associated with different document nodes, either by a DOM nesting (e.g., document within document) or by use of the aria-owns attribute."

因此,如果您的 iframe 是一个文档或应用程序,那么也许可以满足该工具的要求。如果不是,则该工具可能无法正确解释规范。