WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: Formatting lists

for

From: Glenda Watson Hyatt
Date: Oct 24, 2002 10:20AM



Thanks for the suggestion, Jukka. However, what happens when a uses is not
viewing with stylesheets and thus can't find subsection (2)(i)? I guess I
will stick with invalid markup [<p> within a <li>], till I can find a better
solution.

Cheers,
Glenda

> -----Original Message-----
> From: Jukka Korpela [mailto: <EMAIL REMOVED> ]
> Sent: Wednesday, October 23, 2002 11:29 PM
> To: ' <EMAIL REMOVED> '
> Subject: RE: Formatting lists
>
>
> Glenda Watson Hyatt wrote:
>
> > I am working with ordered lists, and need to use parentheses
> > around the numbers, ie (1)...(2)..., as used in legislation
> subsections.
>
> In theory, you could use normal <ol> markup in HTML and counters and
> generated content in CSS, as described in section 12 of the CSS2
> specification:
> http://www.w3.org/TR/REC-CSS2/generate.html
>
> Example of a style sheet:
>
> OL { counter-reset: item }
> LI { display: block }
> LI:before { content: "(" counter(item) ") ";
> counter-increment: item }
>
> But this is not a practical move at present. Browser support seems to be
> limited to Opera. Non-CSS browsers naturally use their default
> presentation
> for <ol>. The problems begin when browsers with _partial_ CSS support come
> into the picture. For example, Netscape displays the list as completely
> unnumbered and unbulleted.
>
> > Or shall I stick to using paragraphs to maintain the
> > punctuation? You know how gov't types are about that kind of stiff.
>
> No, if it's logically a numbered list, use <ol> markup. This will help in
> many situations where the visual presentation is irrelevant.
>
> As a workaround, though, you might consider using <ul> markup with the
> numbers as explicit content, and a CSS rule that suggests suppression of
> bullets:
> <style type="text/css">
> ul li { list-style-type: none; }
> </style>
> ...
> <ul>
> <li>(1) foo
> <li>(2) bar
> </ul>
>
> --
> Jukka Korpela, senior adviser
> TIEKE Finnish Information Society Development Centre
> http://www.tieke.fi/
> Diffuse Business Guide to Web Accessibility and Design for All:
> http://www.diffuse.org/accessibility.html
>
>
> ----
> To subscribe, unsubscribe, or view list archives,
> visit http://www.webaim.org/discussion/
>


----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/