Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Semicolon option?  
3 comments  




2 A slight improvement  
3 comments  













Template talk:Cslist




Page contents not supported in other languages.  









Template
Talk
 

















Read
Edit
Add topic
View history
 








Tools
   


Actions  



Read
Edit
Add topic
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

(Redirected from Template talk:Cslist/styles.css)

Semicolon option?[edit]

Interesting template. It might be useful to have an option like |semi= to change the separator from a comma to a semicolon. – Jonesey95 (talk) 07:58, 16 January 2019 (UTC)[reply]

@Jonesey95: Your slightest wish ...
{{cslist | first item | second item | third item | etc}}
  • first item
  • second item
  • third item
  • etc
{{cslist | first item | second item | third item | etc |semi=true}}
  • first item
  • second item
  • third item
  • etc
Cheers --RexxS (talk) 17:20, 16 January 2019 (UTC)[reply]
Groovy. I polished up the documentation. I think this will be useful. – Jonesey95 (talk) 18:08, 16 January 2019 (UTC)[reply]

A slight improvement[edit]

Hi, RexxS. Is this possible to delete the redundant commas? So it would work like {{hlist}}.

It reads | as an entry. For example:

{{cslist|first item|||}}
  • first item
{{cslist | {{{first item|}}} | {{{second item|}}} | {{{third item|}}} | {{{etc|}}}}}

EDIT: I have found a template named {{Comma separated entries}} which doesn't have such problem. What differs these two?

All the best, --Toghrul Rahimli (talk) 06:33, 18 August 2019 (UTC)[reply]

Thanks for spotting that, Toghrul. I've fixed the issue now, so that empty items don't show up in the list.
The purpose of {{Cslist}} and {{Hlist}} is to create genuine html lists – i.e. they are marked up in the html with <ul>...</ul> and <li>...</li>. That helps them to be more accessible and functional for screen readers. The templates like {{Comma separated entries}} depend on Module:Separated entries, which creates plain text, not the lists that a screen reader could make use of. You can see the difference if you inspect them using the browser inspector.
So it's probably better to use {{Comma separated entries}} in running prose, but use Cslist, Hlist, etc. in infoboxes, tables, and other places where a screen reader expects a list, especially if it's a long list (perhaps more than a couple of entries). HTH --RexxS (talk) 07:39, 18 August 2019 (UTC)[reply]
@RexxS:, thank you for your fix and detailed explanation. Helped a lot. Cheers!--Toghrul Rahimli (talk) 07:44, 18 August 2019 (UTC)[reply]

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template_talk:Cslist&oldid=1229512002"

Categories: 
Template-Class List articles
NA-importance List articles
WikiProject Lists articles
 



This page was last edited on 17 June 2024, at 06:25 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki