Accessibility: Punctuating Links in HTML

  • Thread starter Filippo Giarratano
  • Start date
F

Filippo Giarratano

Please forgive the cross-post -- I'm not sure where to find the people
who can answer my question. Which is this: Does it matter as an
accessibility concern how links in webpages are punctuated? Should
adjacent punctuation be "inside" or "outside" the text that forms the
link?

Example:

A. I read <a href="site.com">"Adventures in Punctuation"</a> avidly.
B. I read "<a href="site.com">Adventures in Punctuation</a>" avidly.

Example:

A. We watched <a href="site.com"><em>I Am Curious (Yellow).</em></a>
B. We watched <a href="site.com"><em>I Am Curious (Yellow</a>).</em>

I can think of aesthetic arguments each way. Are there accessibility
arguments to be considered, too? Would, for example, screen readers
pronounce my example pairs differently?

Or does it not really matter with respect to accessibility?

Oh, and go ahead -- what's your preference on any grounds?
 
N

nice.guy.nige

Please forgive the cross-post -- I'm not sure where to find the people
who can answer my question. Which is this: Does it matter as an
accessibility concern how links in webpages are punctuated? Should
adjacent punctuation be "inside" or "outside" the text that forms the
link?

Example:

A. I read <a href="site.com">"Adventures in Punctuation"</a> avidly.
B. I read "<a href="site.com">Adventures in Punctuation</a>" avidly.

Example:

A. We watched <a href="site.com"><em>I Am Curious (Yellow).</em></a>
B. We watched <a href="site.com"><em>I Am Curious (Yellow</a>).</em>

I would say on both examples, A. In the first example, the quotation marks
refer to a publication title that you are referencing, so include them in
the link. In the second example, well... you've already opened the brackets
within the anchor, so you should close them too.

Cheers,
Nige

--
Nigel Moss.

Email address is not valid. (e-mail address removed). Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
In the land of the blind, the one-eyed man is very, very busy!
 
J

Jukka K. Korpela

Does it matter as
an accessibility concern how links in webpages are punctuated?

Yes, but are you actually asking about punctuation?
Should adjacent punctuation be "inside" or "outside" the text that
forms the link?

The only punctuation in your example is quotation marks. If you use
them, the question is whether it's a quotation as a link or a quoted
link. But I would say you have neither:
A. I read <a href="site.com">"Adventures in Punctuation"</a>
avidly. B. I read "<a href="site.com">Adventures in
Punctuation</a>" avidly.

Since it is a book or article title, or something similar, the adequate
markup is to use the <cite> element:
I read <cite><a href="site.com">Adventures in Punctuation</a></cite>
avidly.
You could nest the elements the other way around too. I don't see a big
difference here, except that making the link an inner element is better
for styling.

Speech browsers might not pay attention to <cite> elements, but this
probably doesn't matter much. It is usually possible to figure out that
it's a citation. Moreover, since it is a link, it will be presented as
different from normal text anyway.
A. We watched <a href="site.com"><em>I Am Curious
(Yellow).</em></a> B. We watched <a href="site.com"><em>I Am
Curious (Yellow</a>).</em>

This too calls for the <cite> element. If you also wish to emphasize
the name of the film, then it would be logical to use both <cite> and
I can think of aesthetic arguments each way. Are there
accessibility arguments to be considered, too?

Rather small. If this is among your most serious problems in
accessibility, you have little to worry about!
 
T

Toby A Inkster

Filippo said:
A. We watched <a href="site.com"><em>I Am Curious (Yellow).</em></a>
B. We watched <a href="site.com"><em>I Am Curious (Yellow</a>).</em>

Not so much an accessibility problem, but consider example B when viewed
in Opera's Links dialogue (Ctrl+J).
 
F

Filippo Giarratano

Toby A Inkster said:
Not so much an accessibility problem, but consider example B when viewed
in Opera's Links dialogue (Ctrl+J).

Right (Ctrl-J in Opera is like a "show links" bookmarklet in Mozilla).
If a machine harvests your links, they'll look silly if only one of a
pair of punctuation marks is included. This supports the choice to
include all adjacent punctuation within the link, since punctuation
pairs may start in the middle of the link -- as in "I Am Curious
(Yellow)."
 
F

Filippo Giarratano

Jukka K. Korpela said:
Since it is a book or article title, or something similar, the adequate
markup is to use the <cite> element:
I read <cite><a href="site.com">Adventures in Punctuation</a></cite>
avidly.

The <cite> attribute has always struck me as well-intentioned but
ill-conceived. Yes, it separates markup from content. But it's hard to
deploy coherently, especially with respect to links: Should we use it
when linking to the cited reference itself, but not to to someone's
comment about it? The <cite> attribute also imposes a single styling
on citations that by long convention are treated differently.
According to the Chicago Manual of Style, for example, article titles
are to be set roman within quotation marks, while book titles are to
be set italic without quotation marks. If I wrap both in <cite>, most
browsers default to italicizing both.
 
J

jake

In message <[email protected]>, Filippo
Example:

A. I read <a href="site.com">"Adventures in Punctuation"</a> avidly.
B. I read "<a href="site.com">Adventures in Punctuation</a>" avidly.
Example:

A. We watched <a href="site.com"><em>I Am Curious (Yellow).</em></a>
B. We watched <a href="site.com"><em>I Am Curious (Yellow</a>).</em>

I can think of aesthetic arguments each way. Are there accessibility
arguments to be considered, too? Would, for example, screen readers
pronounce my example pairs differently?

Yes, it does -- in mine. But that's probably an idiosyncrasy of this
reader. Other readers may or not.

A. I read Adventures in Punctuation avidly
I read *Adventures *in *Punctuation avidly

B. I read Adventures in Punctuation avidly
I read QUOTE *Adventures *in *Punctuation QUOTE avidly

(where * prefixes a word spoken in a 'links' voice)

I can hear no difference between A and B in your second example.
Or does it not really matter with respect to accessibility?
I shouldn't have thought so. although a person who relies on this
technology would be the best one to answer.
Oh, and go ahead -- what's your preference on any grounds?

Personally I code the punctuation within the <a href></a> as I know my
reader will pronounce the punctuation otherwise. But, as I say, it's
probably down to the individual screen-reader/voice-browser on what gets
spoken.

regards.
 
L

Leif K-Brooks

Filippo said:
According to the Chicago Manual of Style, for example, article titles
are to be set roman within quotation marks, while book titles are to
be set italic without quotation marks. If I wrap both in <cite>, most
browsers default to italicizing both.

Then use <cite class="book"> and <cite class="article">.
 
M

Mark Parnell

B. We watched <a href="site.com"><em>I Am Curious (Yellow</a>).</em>

Strangely enough, no one seems to have mentioned that this is invalid
anyway, because the elements overlap. You need to either close the <em>
element before closing the <a> or open it first.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top