473,605 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best accessibility practice? - HTML markup to represent dates

I'm using this at present:
<p title="Publicat ion 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 internationalis ed.

So, what's the best markup for representing a date, with good
accessibility to screen readers?
Sep 28 '05 #1
52 4565
Andy Dingley wrote:
I'm using this at present:
<p title="Publicat ion 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 internationaliz ed 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 internationaliz ed
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="Publicat ion 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 internationalis ed.
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 interpretetatio n 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>Publishe d 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="Septembe r">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.)
Sep 29 '05 #2
In our last episode, Andy Dingley <di*****@codesm iths.com> pronounced to
comp.infosystem s.www.authoring.html,alt.comp.accessibility:
<p title="Publicat ion 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
Sep 29 '05 #3
On Thu, 29 Sep 2005 00:18:57 +0100, Andy Dingley wrote:
I'm using this at present:
<p title="Publicat ion 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
Sep 29 '05 #4
In message <st************ *************** *****@4ax.com>, Andy Dingley
<di*****@codesm iths.com> writes
I'm using this at present:
<p title="Publicat ion 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 internationalis ed.

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


Or in HPR (3.04)

"twenty-eight divided by nine divided by two-thousand-and-five fifteen
colon zero zero"

No commonality amongst readers, then ;-)

So. The only 'safe' way to write it would be a variation on:

<p title="Publicat ion date" >28th September, 2005 at 3pm.</p>

-------------------------------------------------------------------------
----------------

In an ideal world we'd probably write it as:
<p title="Publicat ion date" ><date form="dmyt">[28/09/2005
15:00]</date></p> or something similar.

UAs would then speak it/display it according to local usage.

Regards.

--
Jake (ja**@gododdin. demon.co.uk -- just a 'spam trap' mail address)
Sep 29 '05 #5
Andy Dingley wrote:
so d/m/y is necessary and won't be getting internationalis ed.


Thanks for your comments, even though (this being Usenet) they were
less than useful 8-(

The site _will_ present visible content in the form "[21/09/2005
15:00]"
This is not my choice, it's what the dezyner called for. Yes, there's
an internationalis ation issue. Yes the brackets are eye-candy. Yes, the
leading zero is somewhat odd for UK tradition. However none of these
issues are even up for debate - this is the design, this is what it
_must_ look like. RFC2119 applies.

Sep 29 '05 #6
In article <11************ **********@z14g 2000cwz.googleg roups.com>,
"Andy Dingley" <di*****@codesm iths.com> wrote:
Thanks for your comments, even though (this being Usenet) they were
less than useful 8-(
You should be more grateful. You did get some feedback on how other
screenreaders read this. You also did get good feedback on why
'[21/09/2005 15:00]' is a bad idea.
The site _will_ present visible content in the form "[21/09/2005
15:00]"
This is not my choice, it's what the dezyner called for.


Reread your question (article
<st************ *************** *****@4ax.com>) , and answer us how we
should know from that post that changing the looks of the date is
unacceptable.

With this extra bit of info, I think the problem is unsolvable with
current technology.

We could try to work around the problem, though. Would it be acceptable
to have a user preference (stylesheet change?) that changes the visible
form of the date?

Would it be acceptable to present the date twice (for example once in
the required form, and once as white-on-white, really small, or
whatever, so that only screen-readers would see it?

Neither solution would be good, but they could be better than doing
nothing.

Reinder
Sep 29 '05 #7
Andy Dingley wrote:
I'm using this at present:
<p title="Publicat ion date" >[28/09/2005 15:00]</p>
...
So, what's the best markup for representing a date, with good
accessibility to screen readers?


Take a look at the hCalendar microformat, it may be suitable for your needs.
http://microformats.org/wiki/hcalendar

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Sep 29 '05 #8
On Thu, 29 Sep 2005, Andy Dingley wrote:
Andy Dingley wrote:
so d/m/y is necessary and won't be getting internationalis ed.
Thanks for your comments, even though (this being Usenet) they were
less than useful 8-(


On the contrary, they will be useful for all those readers who care to
learn from them.
The site _will_ present visible content in the form "[21/09/2005
15:00]"
This is not my choice, it's what the dezyner called for.
It doesn't change the facts of the WWW, though.
Yes, there's an internationalis ation issue. Yes the brackets are
eye-candy. Yes, the leading zero is somewhat odd for UK tradition.
However none of these issues are even up for debate


Welcome to usenet. I'm surprised at your reaction to this - it's not
as if you haven't been around for quite a while already.

It was an interesting question, and usenet discussed it, with some
informative results. I *can* say that from a fairly impartial
position, since I didn't really get involved on this particular
thread.

The fact that you now say you can't really apply anything that you may
have learned from it, is your problem, not ours; but usenet never was
a mere help desk, as you well know.

have fun
Sep 29 '05 #9
Lachlan Hunt wrote:
Take a look at the hCalendar microformat,


Thanks! Not sure yet if I can use it (although I'm hopeful) but that's
certainly an interesting thing to bear in mind.

Sep 29 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

131
21607
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately get some good real world examples. Fire away! :) Regards, Peter Foti
136
9283
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
0
7931
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8423
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8411
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8281
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5885
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5444
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3911
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3956
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.