我们可以在 LONGDESC 中使用任何扩展名还是 W3C 只允许使用 .html?

发布于 2024-08-12 00:16:45 字数 156 浏览 4 评论 0原文

我们可以使用 W3C 中的任何扩展吗?或者只允许使用 HTML?以及LONGDESC 链接应该如何打开,仅作为新窗口,还是我们可以在弹出窗口或灯箱中打开Longdesc url?

LONGDESC 对网站 SEO 有什么好处吗?

Can we use any extension in or only HTML is allowed by W3C? and how LONGDESC link should be open , only as new windows or can we open Longdesc url in popup or lightbox?

Does LONGDESC have any benefit for Site SEO?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

吻泪 2024-08-19 00:16:46

我相信任何延期都是可以接受的。 规范没有提及扩展或 MIME 类型。至于在弹出窗口或灯箱中使用它,这很简单:只需使用 AJAX 加载 URL 并将内容添加到弹出窗口即可。在 jQuery 中,它是这样的:

$('a[longdesc]').click(function() {
    $('#popup').load($(this).attr('longdesc'));
});

正如 stuffandnonsense 中所述:

遗憾的是,longdesc 属性对于那些不使用屏幕阅读器的人来说是不可见的,并且某些浏览器不支持。

没有对此进行引用,也没有提及哪些浏览器支持或不支持它,但我认为可以肯定地说,它不会对您的 SEO 有太大帮助。看看该网站,了解一些适合所有访问者的不错的替代方案。

I believe that any extension is acceptable. The spec makes no mention of extensions or mime types. As for using it in a popup or lightbox, that's easy: just use AJAX to load the URL and add the contents to your popup. In jQuery, it's be something like this:

$('a[longdesc]').click(function() {
    $('#popup').load($(this).attr('longdesc'));
});

As noted on stuffandnonsense:

Sadly the longdesc attribute is invisible to those not using screen-readers and goes unsupported by some browsers.

There's no citation on that, and there's no mention of which browsers do or do not support it, but I think it's safe to say that it's not going to help your SEO too much. Take a look at that site for some good alternatives which will work for all visitors.

失去的东西太少 2024-08-19 00:16:46

为了获得最佳 SEO 效果,请使 longdesc 指向同一页面上的锚点。如有必要,请将包含说明的块移出屏幕,以便视力正常的用户看不到它。

另外,请考虑使用 aria-descriptedby 而不是 longdesc。

For best SEO, make the longdesc point to an anchor on the same page. If necessary, move the block containing the description off-screen, so that it is not visible to sighted users.

Also, consider using aria-describedby instead of longdesc.

扭转时空 2024-08-19 00:16:45

我们可以使用 W3C 中的任何扩展吗?或者只允许使用 HTML?

该规范没有强制 URI 的另一端应使用什么类型的资源,但 HTML 文档是最明智的

以及如何打开 LONGDESC 链接(仅作为新窗口)
或者我们可以在弹出窗口或灯箱中打开 Longdesc 网址吗?

我设置了一个 longdesc 然后不管它。我不会用 JavaScript 来接近它。新的窗户和灯箱是无障碍障碍,即使在最好的情况下也应该避免——当资源主要是为了那些需要辅助技术的人的利益而设计时,这种情况就会加倍。

LONGDESC 对网站 SEO 有什么好处吗?

可能吧。搜索引擎不会公开其算法的细节。根据经验,“忘记 SEO。为用户设计并信任搜索引擎来完成他们的工作。”。同样,当实现辅助功能时,这会加倍。

Can we use any extension in or only HTML is allowed by W3C?

The specification doesn't mandate what type of resource should be at the other end of the URI, but an HTML document is most sensible

and how LONGDESC link should be open , only as new windows
or can we open Longdesc url in popup or lightbox?

I'd set up a longdesc and then leave it alone. I wouldn't go near it with JavaScript. New windows and lightboxes are accessibility barriers and should be avoided at the best of times — that goes double when the resource is designed primarily for the benefit of those needing assistive technology.

Does LONGDESC have any benefit for Site SEO?

Possibly. Search engines don't publicize the details of their algorithms. As a rule of thumb "Forget about SEO. Design for users and trust search engines to do their job.". Again, this goes double when implementing an accessibility feature.

伊面 2024-08-19 00:16:45

W3C 没有规定“扩展名”(即最后一个点之后的可选文本)。它可以是任何东西,甚至可以不存在。

可能需要说服您的 Web 服务器提供正确的 MIME 类型。许多 Web 服务器通过查看扩展名来选择 MIME 类型。

The "extension" (i.e. optional text after the final dot) is not prescribed by W3C. It can be anything, or even absent.

Your web-server may need to be convinced to provide the right MIME types. Many web-servers choose MIME types by looking at the extension.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文