iframe 的可用性、可访问性、屏幕阅读器或任何其他开发、功能、跨浏览器问题是什么?
的可用性、可访问性、屏幕阅读器或任何其他开发、功能或跨浏览器问题是什么?
有其他选择吗?
是否有任何 JavaScript/jQuery 或服务器端技术可以减少 的可用性、可访问性或屏幕阅读器问题?
为什么 W3C 没有将 纳入 XHTML Strict,而 HTML 5 支持
?
更新:
我在这里也发现了一些好想法: http://uxexchange.com/questions/1817/iframe-accessibility-and-usability-issues
What are the usability, accessibility, screen-reader, or any other development, functionality, or cross browser issues with <iframe>
?
Is there any alternative for <iframe>
?
And are there any JavaScript/jQuery or server-side techniques which can decrease the usability, accessibility, or screen-reader issues with <iframe>
?
Why has the W3C not included <iframe>
in XHTML Strict, while HTML 5 supports <iframe>
?
update:
I found some good thoughts here also : http://uxexchange.com/questions/1817/iframe-accessibility-and-usability-issues
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
辅助功能:
可用性:
主窗口上的滚动条
iframe。这对于
滚动
其他问题:
Accessibility:
Usability:
scroll bars on the main window and on
the iframe. It's difficult for
scrolling
Other issues:
因为当时它被视为广受诟病的
标签的私生子。原则上
具有许多与
相同的属性,但实际上它似乎鼓励更有品味的使用,通常避免了最糟糕的情况框架集接口遇到的导航和可用性问题。
(一个)。因为,与
不同,
已被证明对于混合文档(例如包含广告的文档)和许多类型的 Web 应用程序至关重要。正如其他答案中提到的,仍然存在问题,但通常
被视为保留的必要功能。
则不然,它是 HTML5 中的“不合格功能”(最接近的 HTML5 达到任何类型的“严格”)。
(b).因为 HTML5 的作者并不太关心鼓励良好的实践;它是关于记录用户代理必须做什么。他们将 HTML4 的所有过时功能以及许多其他传统但狡猾的浏览器行为(包括损坏的标签汤解析的每一个怪癖)都纳入了标准。 [旁白:我很高兴看到他们的列表中讨论的最新论点是应该如何处理
元素 - 自 HTML 2.0 的表单元素以来,实际上没有人使用过这个元素于 1995 年使其过时。]鉴于 HTML5 的惊人大小和复杂性,他们不希望付出额外的努力来声明更有限的“严格模式”配置文件,这并不奇怪。不过,随着工作的结束,我希望看到 XHTML5 Strict 或类似的努力来减少一些混乱。就目前情况而言,Hixie 和 chums 已经对当今浏览器为实现兼容性而必须采用的每一个令人讨厌的黑客行为进行了快照,并将其作为可预见的未来所有浏览器的标准要求,从而有效地宽恕了这种不良做法。
Because at the time it was seen as a bastard child of the widely-reviled
<frame>
tag. In principle<iframe>
has many of the same properties as<frame>
, but in practice it seems to have encouraged more tasteful use, generally avoiding the worst of the navigational and usability problems that frameset interfaces suffered.(a). Because, unlike the
<frame>
,<iframe>
has since turned out to be essential for mixed documents such as those including adverts, and many types of web application. There are still problems, as mentioned in other answers, but generally the<iframe>
is seen as a necessary feature that is here to stay. This isn't true of<frame>
, which is a “non-conforming feature” in HTML5 (the nearest HTML5 gets to any kind of ‘strict’).(b). because the authors of HTML5 don't so much care about encouraging good practice anyway; it's about documenting what user-agents must do. They have thrown every obsolete feature of HTML4 into the standard, along with a lot of other traditional but dodgy browser behaviour including every last quirk of broken tag soup parsing. [aside: I am greatly amused to see the latest argument being discussed on their list being how the
<isindex>
element should be handled — an element that literally nobody has used since HTML 2.0's form elements made it obsolete in 1995.]Given the staggering size and complexity of HTML5, it's not really surprising that they didn't want the extra effort of declaring a more limited ‘strict mode’ profile. As work comes to an end, though, I would love to see an XHTML5 Strict or similar effort to trim back some of this mess. As it stands, Hixie and chums have taken a snapshot of every nasty hack a browser has to put in for compatibility today, and made it a standard requirement for all browsers in the foreseeable future, effectively condoning the bad practice.
如果您只有一个 Iframe,就不会有什么问题。然而,多个 iframe 使问题变得更加复杂。焦点不清晰,屏幕阅读器不够智能,无法找到视觉相关性(这与表格不利于设计的原因相同)。 ARIA 是解决一些类似问题的尝试。 YUI 插件链接提供了更多信息。
然而 iframe 确实在设计中找到了自己的位置。在我之前工作的一个项目中,页面包含两个 iframe(其中一个是隐藏的),隐藏的框架用于下载身份验证小程序。这不会增加任何可访问性问题,因为注意力仅限于与页面无缝合并的单个 iframe
If you have a single Iframe, there would be little issue. However, multiple iframes compound the problem. A point of focus is not clearly available and the screen readers are not intelligent enough to find visual correlation (same reason why tables are bad for design). ARIA is an attempt being made to resolve some similar issues. YUI plugin link has more information.
However iframes do find their place in design. In one project I worked before, the page contained two iframes (one of them hidden) and the hidden frame was used to download an authentication applet. This doesn't add any accessibility woes as the point of attention is limited to a single iframe which seemlessly merges with the page