最佳无障碍实践? - 用于表示日期的HTML标记 [英] Best accessibility practice? - HTML markup to represent dates

查看:64
本文介绍了最佳无障碍实践? - 用于表示日期的HTML标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在使用它:

< p title ="出版日期" > [28/09/2005 15:00]< / p>


在屏幕上正常工作,但是Fangs / Jaws只是将其读作左支架

二十八斜线零斜线二千五十五冒号零右边

括号真的需要更多的东西来表明它是_日_

日期。


使用CSS更好地完成括号:内容:,

但老板也希望它能在IE下工作。该网站基于英国

,所以d / m / y是必要的,不会被国际化。


那么,什么是表示日期的最佳标记,屏幕阅读器具有良好的可访问性?

解决方案

Andy Dingley写道:

我现在正在使用它:
< p title ="出版日期" > [28/09/2005 15:00]< / p>


这样的日期表示法疏远了超过一半的人类,并且它至少在白天的时候保证会造成严重的问题/>
小于13,从那时起相当少数(包括大多数人在美国的b $ b)将以不同于预期的方式理解

的含义。


理想情况下,作者会以他认为合适的格式输入日期,

将其自动转换为国际化格式(例如

作为ISO 8601)在内部,用户代理将以用户选择的格式向每个

用户显示日期。如果用户如此选择,这种格式可能必须与不同的内容语言不同。


我们离HTML创作的情况很远,部分是因为

HTML没有任何日期标记(以及时间,金额,

十进制数,以及应该国际化的其他数据

内部,外部本地化。


结论是,在实践中,只有两种合理的方式可以在HTML文档中显示日期:

- 使用与语言相关的表示法,其中月份使用

字表示,或者可能是传统的字母缩写,例如九月

28,2005或者,如果简洁真的很重要,2005年9月28日

- 使用ISO 8601日期表示法,例如2005-09-28,通常带有

解释或指示符号的解释;这通常是表格,时间顺序列表和多语言材料的最佳方法。


标题怎么样?是的,那怎么样?它是一种可选的甜味剂,

无需依赖。如果用户不知道并且不能从[28/09/2005 15:00]是出版日期的其他信息中扣除



的时间(某些?) ,title ="出版日期"不会帮助
多了。那些对某些信息感到困惑的人通常不会移动

鼠标来查看是否有工具提示,特别是当文本看起来没有

与普通文本不同时并且没有暗示鼠标悬停在我身上!。


(顺便说一下,几十年来我虽然日期仅表示时间

以一天的粒度指定,即每天的识别,

月和年。直到后来我才意识到我对

英语的理解在这方面并不完美:date可能意味着,或者它可能意味着
意味着日期和时间,即以
秒的粒度指定的时间,甚至更准确我仍然不会假设

每个人都知道日期的扩展含义。)


关于标记的使用,我不知道t think [28/09/2005 15:00]

构成一个段落,即使在自由解释下也是如此。使用< div>它会更好

或者< span>标记比语义错误标记,如< p>

为非段落。

在屏幕上正常工作,但Fangs / Jaws只是将其读作左括号
二十八斜线零斜线二千五十五冒号零右边
括号真的需要更多的东西来表明它是一个日期。


我们需要这样的标记,但我们必须这样做。

使用CSS更好地完成[...]括号:内容:,
但老板也想让它在IE下工作。


你有一个聪明的老板。


你认为首先需要括号的是什么?所有

读者都会理解他们的预期方式吗?

该网站基于英国
,所以d / m / y是必要的,不会是变得国际化。


错误的想法。当你在万维网上时,你无法知道访客的语言,种族,性别或种类。你可以假设,

并且你可能大部分都认为是正确的,这意味着你的假设有时会是假的。


当然,英国人对2005年9月28日的符号有所了解,并明确地理解它吗?

他们是否理解,比如说,11/09/2005你想要的方式取决于

他们的背景;如果有人刚刚离开美国,那么......

事实上,我担心英国已经以很多方式美国化了很多用户可能不确定

符号的解释 - 他们怎么能知道你的页面不只是使用日期

符号表示在美国写的软件会吐出来?


(另外,[28/09/2005 15:00]远非传统的英国风格,

领先零和24 - 小时钟。也就是说,它甚至不是时尚的。但无论如何,清晰度和明确性是第一要务,至少为b / b
日期。)

那么,代表日期的最佳标记是什么,屏幕阅读器具有良好的可访问性?




< div>发表于2005年9月28日。< / div>

(最好使用9月份而不是9月份,因为屏幕阅读器将很难知道或猜测这里是9月应该作为缩写阅读。

使用< abbr title ="九月">九月< / abbr>虽然理论上可能有些书可能是正确的,但是大多数都是毫无意义的。它会分散注意力很多人使用图形浏览器显示带有

虚线下划线的缩写。)


在我们的最后一集中,Andy Dingley< di ***** @ codesmiths.com>发音为

comp.infosystems。 www.authoring .html,alt.comp.accessibility:

< p title ="出版日期" > [28/09/2005 15:00]< / p>
< snip> [...]括号最好用CSS完成,:之前和内容:,


他们最好完全放弃恕我直言。

但是老板也想让它在IE下工作。


可以理解。

那么,代表日期的最佳标记是什么,屏幕阅读器具有良好的可访问性?



完整地写出来,这些内容如下:


2005年9月28日下午3点。

-

Mark Parnell
http:/ /clarkecomputers.com.au


2005年9月29日星期四00:18:57 +0100,Andy Dingley写道:

我现在正在使用它:
< p title ="出版日期" > [28/09/2005 15:00]< / p>




这不仅是屏幕阅读器的问题,也是其他浏览器的问题

,因为有些国家/地区使用MM / DD / YYYY而其他国家/地区使用DD / MM / YYYY格式

这可能会让您很难猜到您所说的日期。


所以我的建议是完全写出来:


2005年9月28日下午3点


-

正在播放:

Rod Modell - Grand Bend


I''m using this at present:
<p title="Publication date" >[28/09/2005 15:00]</p>

Works fine on screen, but Fangs/Jaws just reads it as "left bracket
twenty-eight slash zero slash two thousand five fifteen colon zero right
bracket" Really it needs something more to indicate that it _is_ a
date.

The [...] brackets would be better done with CSS, :before and content: ,
but the boss wants it to work under IE too. The site is firmly UK
based, so d/m/y is necessary and won''t be getting internationalised.

So, what''s the best markup for representing a date, with good
accessibility to screen readers?

解决方案

Andy Dingley wrote:

I''m using this at present:
<p title="Publication date" >[28/09/2005 15:00]</p>
Such a date notation is alienating to more than half of mankind, and it
is guaranteed to cause serious problems at least when the day number is
less than 13, since then a considerable minority (including most people
in the U.S.) will understand in a manner different from the intended
meaning.

Ideally, an author would enter a date in a format he finds suitable,
have it automatically transferred to an internationalized format (such
as ISO 8601) internally, and user agents would display the date to each
user in a format chosen by the user. This format might have to be
different for different content languages, if the user so chooses.

We are very far from such a situation in HTML authoring, partly because
HTML lacks any markup for dates (as well as times, monetary amounts,
decimal numbers, and other data that should be internationalized
internally, localized externally).

The conclusion is that in practice, there are just two sensible ways of
presenting dates in HTML documents:
- use a language-dependent notation where the month is expressed using a
word, or perhaps a conventional alphabetic abbreviation, e.g. "September
28, 2005" or, if conciseness really matters, "Sep 28, 2005"
- use the ISO 8601 date notation, such as "2005-09-28", usually with an
explanation or pointer to an explanation of the notation; this is often
the best approach in tables, chronological lists, and multilingual material.

What about the title? Yes, what about it? It is an optional sweetener,
nothing to be relied upon. If the user does not know and cannot deduce
from other information that [28/09/2005 15:00] is publication date and
time for something (which?), title="Publication date" will not help
much. People who are puzzled by some information won''t usually move the
mouse to see if there''s a tooltip, especially when the text looks no
different from normal text and makes no suggestion "mouse over me!".

(As an aside, for some decades I though that "date" only means time
specified with a granularity of a day, i.e. identification of day,
month, and year. Only later did I realize that my understanding of
English was imperfect in this respect: "date" may mean that, or it may
mean "date and time", i.e. time specified with a granularity of a
second, or even more exactly. I would still refrain from assuming that
everyone knows the extended meaning of "date".)

Regarding the use of markup, I don''t think [28/09/2005 15:00]
constitutes a paragraph even under a liberal interpretation. It''s better
to use <div> or <span> markup than semantically wrong markup, like <p>
for a non-paragraph.
Works fine on screen, but Fangs/Jaws just reads it as "left bracket
twenty-eight slash zero slash two thousand five fifteen colon zero right
bracket" Really it needs something more to indicate that it _is_ a
date.
We would need such markup, but we have to do without.
The [...] brackets would be better done with CSS, :before and content: ,
but the boss wants it to work under IE too.
Quite a clever boss you have.

What makes you think you need brackets in the first place? Will all
readers understand them the intended way?
The site is firmly UK
based, so d/m/y is necessary and won''t be getting internationalised.
Wrong idea. When you''re on the World Wide Web, you cannot know the
language, race, sex, or species of your visitors. You can just assume,
and you might mostly assume right, which means your assumptions will be
false at times.

Surely people in the United Kingdom understand the notation
September 28, 2005, and understand it unambiguously?
Whether they understand, say, 11/09/2005 the way you want depends on
their background; if someone just moved from the U.S., well,...
In fact, I''m afraid the United Kingdom has been Americanized in many
ways so much that users can be uncertain about the interpretetation of
notations - how could they know that your page doesn''t just use a date
notation that software written in the U.S. spits out?

(Besides, [28/09/2005 15:00] is far from traditional British style, too,
with the leading zero and with the 24-hour clock. That is, it isn''t even
stylish. Anyway, make clarity and unambiguity the first priority, at
least for dates.)
So, what''s the best markup for representing a date, with good
accessibility to screen readers?



<div>Published in September 28, 2005.</div>
(It''s better to use September than Sep, since a screen reader will
hardly know or guess that here "Sep" should be read as an abbreviation.
Using <abbr title="September">Sep</abbr> would mostly be pointless,
though perhaps theoretically correct by some book. It would distract
many people using a graphic browser that shows the abbreviation with a
dotted underline.)


In our last episode, Andy Dingley <di*****@codesmiths.com> pronounced to
comp.infosystems.www.authoring.html,alt.comp.accessibility:

<p title="Publication date" >[28/09/2005 15:00]</p> <snip> The [...] brackets would be better done with CSS, :before and content: ,
They would be better dropped altogether IMHO.
but the boss wants it to work under IE too.
Understandably.
So, what''s the best markup for representing a date, with good
accessibility to screen readers?



Write it out in full, something along these lines:

28th September, 2005 at 3pm.

--
Mark Parnell
http://clarkecomputers.com.au


On Thu, 29 Sep 2005 00:18:57 +0100, Andy Dingley wrote:

I''m using this at present:
<p title="Publication date" >[28/09/2005 15:00]</p>



That is not only a problem for screenreaders but also for other browsers
because some countries use MM/DD/YYYY and others use DD/MM/YYYY format
which can make it pretty hard to guess what date you are talking about.

So my suggestion is to write it out fully:

28 September 2005 at 3 PM

--
Now Playing:
Rod Modell - Grand Bend


这篇关于最佳无障碍实践? - 用于表示日期的HTML标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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