我正在使用使用此代码的 Like 按钮的 HTML5 实现:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=<%= locals[:appId] %>";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
这会在页面中生成两个 iframe:
<div>
<iframe id="fb_xdm_frame_http" name="fb_xdm_frame_http" src="http://static.ak.facebook.com/connect/xd_arbiter.php?version=18#channel=f118ae5cc&origin=http%3A%2F%2Fau0078.local%3A4567&channel_path=%2FTE01_home_page_mobile.html%3Ffb_xd_fragment%23xd_sig%3Df324a069cc%26" tabindex="-1"></iframe>
<iframe id="fb_xdm_frame_https" name="fb_xdm_frame_https" src="https://s-static.ak.facebook.com/connect/xd_arbiter.php?version=18#channel=f118ae5cc&origin=http%3A%2F%2Fau0078.local%3A4567&channel_path=%2FTE01_home_page_mobile.html%3Ffb_xd_fragment%23xd_sig%3Df324a069cc%26" tabindex="-1"></iframe>
</div>
这些 iframe 都没有title
属性,因此它们会导致可访问性错误。知道我如何解决这个问题吗?