Re: [css-d] Is there a way to get lists to use decimal points?
Benjamin Hawkes-Lewis wrote: On 5/2/09 23:17, Sandy wrote: Do screen readers not read generated list counters? JAWS and Window-Eyes do not currently read text inserted with the content property, although they do reflect list-style-type values. How would you let a screen reader know that you are in a list if you are using real numbers? [snip] Is there another reason than accessibility that numbers as real text are what we need? Well, if the numbers are part of the content (e.g. certain legal documents), then they belong in the content layer (HTML) not the skinning layer (CSS). Remember a user isn't necessarily seeing your skin; they might be applying their own CSS or viewing with a user agent that doesn't support CSS. There's no satisfying way of doing this, but the following are all viable approaches: ul li1. foo/li li2. bar/li /ul p1. foo/p p2. bar/p dl dt1./dt ddfoo/dd dt2./dt ddbar/dd /dl h21./h2 pfoo/p h22./h2 pbaz/p Personally, I'd normally go for the first option. I would avoid: ol li1. foo/li li2. bar/li /ol since you could end up with the user being presented a confusing double-numbering of items (once from the ol and once from the text content of the li). -- Benjamin Hawkes-Lewis Benjamin, Tedd, Jukka, Georg, Thanks so much for taking the time to help me think about this, and for sharing your expertise. Benjamin - this was the sentence! Well, if the numbers are part of the content (e.g. certain legal documents), then they belong in the content layer (HTML) the numbers are part of a (you guessed it) legal document, so there they are in the content layer. http://www.caut.ca/ugfa/test/about/plan2intent.html This has the added advantage of making sense to me, unlike php (but thank you, Tedd)! Benjamin, JAWS and Window-Eyes do not currently read text inserted with the content property, although they do reflect list-style-type values. does this mean that if you have an ol that someone using a screen reader won't hear the list numbers? Thanks! Sandy __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Is there a way to get lists to use decimal points?
At 1:28 PM +0200 2/7/09, Jukka K. Korpela wrote: Sandy wrote: Is there a way to get lists to use decimal points? No, not in CSS in a manner that would work in most browsing situations. Maybe you can use server-side generated content, so that the numbering appears as part of the list items (in which case you would make the best effort of preventing browsers from adding their own numbering, i.e. would use list-style-type: none if you use list markup). Or maybe you could consider using client-side scripting that adds the numbering, assuming that you find it acceptable that some default numbering (or no numbering) appears when client-side scripting is off. Jukka: You are absolutely right, neither css nor html can accomplish that type of list. My personal choice would not be to use a client side language. Instead, I would do what you advise and set the list-style-type to none in the css and then within the html, I would use php. Here's a couple of examples, with code: http://www.webbytedd.com/b4/decimal-list/ HTH's. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Is there a way to get lists to use decimal points?
On 5/2/09 23:17, Sandy wrote: Do screen readers not read generated list counters? JAWS and Window-Eyes do not currently read text inserted with the content property, although they do reflect list-style-type values. How would you let a screen reader know that you are in a list if you are using real numbers? [snip] Is there another reason than accessibility that numbers as real text are what we need? Well, if the numbers are part of the content (e.g. certain legal documents), then they belong in the content layer (HTML) not the skinning layer (CSS). Remember a user isn't necessarily seeing your skin; they might be applying their own CSS or viewing with a user agent that doesn't support CSS. There's no satisfying way of doing this, but the following are all viable approaches: ul li1. foo/li li2. bar/li /ul p1. foo/p p2. bar/p dl dt1./dt ddfoo/dd dt2./dt ddbar/dd /dl h21./h2 pfoo/p h22./h2 pbaz/p Personally, I'd normally go for the first option. I would avoid: ol li1. foo/li li2. bar/li /ol since you could end up with the user being presented a confusing double-numbering of items (once from the ol and once from the text content of the li). -- Benjamin Hawkes-Lewis __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Is there a way to get lists to use decimal points?
Sandy wrote: Is there a way to get lists to use decimal points? No, not in CSS in a manner that would work in most browsing situations. Maybe you can use server-side generated content, so that the numbering appears as part of the list items (in which case you would make the best effort of preventing browsers from adding their own numbering, i.e. would use list-style-type: none if you use list markup). Or maybe you could consider using client-side scripting that adds the numbering, assuming that you find it acceptable that some default numbering (or no numbering) appears when client-side scripting is off. I need the sub-points in point 1 to be 1.01 1.02 and the sub points in point 2 to be 2.01 2.02 2.03 That does not quite mean using decimal points, but your point is taken. :-) Such numbering systems are used in some contexts, and it would be nice to be able to use them via CSS. But this would require using generated content and counters, which are not supported by the most common browser, IE (in any version up to and including the latest version IE 7). -- Yucca, http://www.cs.tut.fi/~jkorpela/ __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] Is there a way to get lists to use decimal points?
Hey All, Is there a way to get lists to use decimal points? I need the sub-points in point 1 to be 1.01 1.02 and the sub points in point 2 to be 2.01 2.02 2.03 etc. The list in question goes to 18.05 thanks! Sandy __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Is there a way to get lists to use decimal points?
Sandy wrote: Is there a way to get lists to use decimal points? Think so, but it has been a while since I tested it... http://www.w3.org/TR/CSS21/generate.html#content http://www.w3.org/TR/CSS21/generate.html#counters ...and I can't remember where I left those tests :-) Won't work in IE7 and older. IE8 should do fine, I think. Also: if numbering is important part of content, generated stuff won't do - not even an ordered list's regular counters. Only numbers as real text will work then. regards Georg -- http://www.gunlaug.no __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Is there a way to get lists to use decimal points?
Gunlaug Sørtun wrote: Sandy wrote: Is there a way to get lists to use decimal points? Think so, but it has been a while since I tested it... http://www.w3.org/TR/CSS21/generate.html#content http://www.w3.org/TR/CSS21/generate.html#counters ...and I can't remember where I left those tests :-) Won't work in IE7 and older. IE8 should do fine, I think. Also: if numbering is important part of content, generated stuff won't do - not even an ordered list's regular counters. Only numbers as real text will work then. regards Georg Georg, thanks yet again for your help. Do screen readers not read generated list counters? Acck! JAWS and WindowEyes both, or just one or the other? How would you let a screen reader know that you are in a list if you are using real numbers? Would an li with no bullet work if you wrote lispan class=number2.1/span List item content./li Is there another reason than accessibility that numbers as real text are what we need? thanks! Sandy __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/