我明白Alt属性。标题/摘要属性 - 用于什么? [英] Alt attribute I understand. Title/summary attributes - used for what?

查看:44
本文介绍了我明白Alt属性。标题/摘要属性 - 用于什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我完全理解< img>中alt属性的用途标签

但你为什么要在其中使用标题或摘要属性,例如,

a< p>标签。我读过书,建议我使用它们,但为什么呢?

这增强了可访问性吗?请说明为什么人们会想要使用这些?b $ b来使用这些?谢谢


Burnsy

解决方案

bi ****** @ yahoo.co.uk 写道:

我完全理解alt的目的< img>中的属性标签
但你为什么要在其中使用标题或摘要属性,例如,
< p>标签。




标题 - 提供有关该段落的咨询信息(这是你不会经常做的事情的b $ b)/ br / >

摘要 - 从不。 < p>元素没有摘要属性,只有

< table>确实如此。


以下是一个例子:


< table summary ="该bug影响所有版本的MSIE / Win,除了6在标准模式下是

。">

< caption>受影响的版本< / caption>

< thead>

< tr>

< th scope =" col"> Version< / th>

< th scope =" col">模式< / th>

< th scope =" col">出现错误< / th>

< / tr>

< / thead>

< tbody>

< tr class =" bad">< th scope =" row" > 4 - 5.5< / th>< td> n / a< / td>< td>是< / td>< / tr>

< tr class =" bad">< th scope =" row"> 6< / th>< td> Quirks< / td>< td>是< / td>< / tr>

< tr class =" good">< th scope =" row"> 6< / th>< td>标准< / td>< td>否< / td>< / tr>

< / tbody>

< / table>

-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

Home是〜/ .bashrc的地方


bi ****** @ yahoo.co.uk 写道:


你好,

我完全理解< img>中alt属性的用途。标签
但你为什么要在其中使用标题或摘要属性,例如,
< p>标签。我读过书,建议我使用它们,但为什么呢?这增强了可访问性吗?请说明为什么人们会想要使用这些?谢谢

Burnsy




ALT用于提供一个简短的文本替代图像,其中

浏览器不显示图像。


TITLE(属性,而不是< TITLE>元素)提供了一个文本

" tooltip"您希望每个人都能看到,即使图像确实显示为
。这通常仅在光标结束时可见

具有TITLE属性的元素。


对于使用两者的示例,请参阅我的

< URL:http://www.rossde.com/Canada_trip/Vancouver_Montreal.html>。

向下滚动到任意图像,然后将光标放在图像上。你好b / b
应该看到一个工具提示。


右边的第一张图片(火车照片的缩略图)

car)ALT我们在温哥华车站的VIA铁路列车,

描述图像。它还有TITLE选择此图片作为我们在加拿大的火车旅行的第一站的
照片,表示

给用户这是一个链接。 (在我的网站
本节的主页上,我解释说当你浏览这些页面时,你会看到

一些缩略图照片。每个缩略图都是一个链接到页面

带标题的全尺寸照片。只需选择缩略图即可查看

照片。)


-


David E. Ross

< URL:http://www.rossde.com/>


我使用Mozilla作为我的Web浏览器,因为我想要一个符合Web标准的浏览器

。请参阅< URL:http://www.mozilla.org/>。


bi ****** @ yahoo.co.uk 写道:



我完全理解< img>中alt属性的用途标签
但你为什么要在其中使用标题或摘要属性,例如,
< p>标签。我读过书,建议我使用它们,但为什么呢?这增强了可访问性吗?请说明为什么人们会想要使用这些?谢谢

Burnsy




title属性只能用于短消息。 HTML 4.01

规范和WAI提及短消息,简短描述,咨询

标题,信息链接标题等。对于title属性。由于工具提示

仅在现代浏览器上显示约6秒,我建议不再使用

而不是128个字符的title属性。

标题属性对链接特别重要和有用; WAI和

可用性大师J. Nielsen建议编写标题属性为

链接打开新窗口。


*"如果你的链接产生了一个新窗口,或者导致另一个窗口显示在你的显示器上,或者将系统的焦点移到一个新的框架上

或者Window,那么最好的事情就是告诉用户

就像那样会发生。万维网联盟可访问性

关于弹出窗口的倡议( http://www.w3.org/WAI/wcag-curric/sam77-0.htm

*使用链接标题为用户提供在点击之前预览每个

链接将在哪里获取它们。

网页设计中的十件好事( http: //www.useit.com/alertbox/991003.html) ,Jakob Nielsen,

1999年10月

*使用链接标题帮助用户预测他们的位置正在上演

http:// www。 useit.com/alertbox/980111.html) ,Jakob Nielsen,1998年1月


摘要仅用于表格元素。摘要可帮助浏览器提供

语音支持,以便可以大声读取和说出摘要。


"表的摘要永远不会显示在可视化浏览器中;

专为屏幕阅读器和语音浏览器设计。这听起来很像是一个总结,比

标题更长的描述。它通常在标题之前立即读取。

潜入辅助功能

提供表格摘要
http://diveintoaccessibility.org/day...or_tables.html


DU

-

网站上说使用Internet Explorer 5或更好......所以我切换到了

Firefox 1.0.4 :)) />


Hi,

I fully understand the purpose of an alt attribute within a <img> tag
but why would you use a title or summary attribute within, for example,
a <p> tag. I have read books recommending that I use them but why? Does
this enhance accessibility? Please provide reasons why one would want
to use these? Thanks

Burnsy

解决方案

bi******@yahoo.co.uk wrote:

I fully understand the purpose of an alt attribute within a <img> tag
but why would you use a title or summary attribute within, for example,
a <p> tag.



Title - to provide advisory information about the paragraph (this is
something you wouldn''t do frequently)

Summary - never. The <p> element doesn''t have a summary attribute, only
<table> does.

An example of that follows:

<table summary="The bug affects all versions of MSIE/Win except 6 when it is
in standards mode.">
<caption>Versions Affected</caption>
<thead>
<tr>
<th scope="col">Version</th>
<th scope="col">Mode</th>
<th scope="col">Bug appears</th>
</tr>
</thead>
<tbody>
<tr class="bad"><th scope="row">4 - 5.5</th><td>n/a</td><td>Yes</td></tr>
<tr class="bad"><th scope="row">6</th><td>Quirks</td><td>Yes</td></tr>
<tr class="good"><th scope="row">6</th><td>Standards</td><td>No</td></tr>
</tbody>
</table>
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


bi******@yahoo.co.uk wrote:


Hi,

I fully understand the purpose of an alt attribute within a <img> tag
but why would you use a title or summary attribute within, for example,
a <p> tag. I have read books recommending that I use them but why? Does
this enhance accessibility? Please provide reasons why one would want
to use these? Thanks

Burnsy



ALT is used to provide a brief text alternative to an image where a
browser does not display images.

TITLE (the attribute, not the <TITLE> element) provides a text
"tooltip" that you want everyone to see, even if images are indeed
displayed. This is usually visible only when your cursor is over
the element that has a TITLE attribute.

For an example where both are used, see my
<URL:http://www.rossde.com/Canada_trip/Vancouver_Montreal.html>.
Scroll down to any image, and put your cursor over the image. You
should see a "tooltip".

The first image on the right (a thumbnail of a photo of a train
car) has the ALT "our VIA Rail train at Vancouver station",
describing the image. It also has the TITLE "select this image for
photos of the 1st leg of our train trip across Canada", indicating
to users that this is a link. (On the main page of this section of
my Web site, I explain "As you browse these pages, you will see
some thumbnail photos. Each thumbnail is a link to a page of
full-size photos with captions. Just select a thumbnail to see the
photos.")

--

David E. Ross
<URL:http://www.rossde.com/>

I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.


bi******@yahoo.co.uk wrote:

Hi,

I fully understand the purpose of an alt attribute within a <img> tag
but why would you use a title or summary attribute within, for example,
a <p> tag. I have read books recommending that I use them but why? Does
this enhance accessibility? Please provide reasons why one would want
to use these? Thanks

Burnsy



title attribute should only be used for short messages. The HTML 4.01
spec and WAI mention "short message", "short description", "advisory
title", "informative link title" for the title attribute. Since tooltip
will only show for about 6 seconds on modern browsers, I suggest no more
than 128 characters for title attribute.
Title attribute is particularly important and useful for links; WAI and
usability guru J. Nielsen recommends to code the title attribute for
links opening new windows.

* "If your link spawns a new window, or causes another windows to
''pop up'' on your display, or move the focus of the system to a new FRAME
or Window, then the nice thing to do is to tell the user that something
like that will happen." World Wide Web Consortium Accessibility
Initiative regarding popups (http://www.w3.org/WAI/wcag-curric/sam77-0.htm)
* "Use link titles to provide users with a preview of where each
link will take them, before they have clicked on it." Ten Good Deeds in
Web Design (http://www.useit.com/alertbox/991003.html), Jakob Nielsen,
October 1999
* Using Link Titles to Help Users Predict Where They Are Going
(http://www.useit.com/alertbox/980111.html), Jakob Nielsen, January 1998

Summary is only used for table elements. Summary helps browsers with
voice support so that summary can be read and spoken out loud.

"The summary of a table is never displayed in visual browsers; it is
exclusively designed for screen readers and speech browsers. It is
exactly what it sounds like: a summary, a longer description than the
caption. It is usually read immediately before the caption."
Dive Into Accessibility
Providing a summary for tables
http://diveintoaccessibility.org/day...or_tables.html

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Firefox 1.0.4 :)


这篇关于我明白Alt属性。标题/摘要属性 - 用于什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆