This is an archive of past discussions about Template:Collapsible list. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.
Per MOS:DONTHIDE this should not be in a collapsed state by default. Other collapsible content templates have been fixed (unless I'm missing one somewhere) to resolve this failure to comply with the guidelines. Auto-collapsing content is both an accessibility problem (screenreader users cannot expand it) and a mobile problem (various mobile devices/browsers will not show such elements or allow them to be expanded again). There are two approaches to fixing this (then updating the /doc to compensate):
Invert the default behavior.
Install a namespace switch to invert the default behavior in mainspace, but leave it auto-collapsing otherwise.
Option 2 might theoretically be preferable if a) this template is frequently used outside of mainspace, and b) only for content where accessibility and mobile use are not an issue. I'm very skeptical this will actually be applicable, so absent a strong showing that is it, option should be implemented. — SMcCandlish☏¢ 😼 12:03, 29 July 2018 (UTC)
Liststyle centers text and does not make it smaller
Please see these test cases. When I try to add |liststyle=font-size:85%; to a bulleted list, the text is not made small, and it is centered instead of placed at the left. I expect that the problem is either in my parameter value or in the logic applied when a custom liststyle is chosen. Who can tell me what is going on here? – Jonesey95 (talk) 17:24, 19 June 2020 (UTC)
On WikiProject Video games, we use collapsible lists in infoboxes where many release dates are listed and use the initial date as title of the list. However, when the list is expanded the initial date is shown once as the title and once in the platform-specific section within the list, making the first one redundant.
Given this, is it possible to hide the title when the list is uncollapsed or could that feature be implemented? Lordtobi (✉) 07:24, 6 June 2018 (UTC)
Not sure what needs to be changed in an X to Y fashion since I have no knowledge editing templates this complex, but here's the issue: When I implemented {{Collapsible list}} on Tesla, Inc. as can be seen on this diff the title overflowed under the "show" link, so I had to insert <br/> in the title of the collapsible list in this diff. (In this edit I also made it an hlist but that's unrelated to my request.) This is not the most ideal compromise as some readers view Wikipedia in different fonts, sizes and with certain accessibility modes active that may make this compromise ineffective. Please may you assist me in rectifying this by in some way making the area behind the "show" button unable to have title text be printed behind it. comrade waddie96 (talk)17:15, 2 March 2020 (UTC)
TheDJ tried to fix this problem (list name overlaps the show/hide link) a while ago (see section above), but it didn't work. Someone else might have a brilliant idea to fix this long-standing problem. – Jonesey95 (talk) 18:18, 2 March 2020 (UTC)
We have to give up one of them: either the text is precisely centered, and consequently it overlaps with the collapse toggle, or it doesn’t overlap, but consequently goes to the left that much. I support readability over precise alignment. —Tacsipacsi (talk) 22:41, 10 March 2020 (UTC)
Not done for now: I'm getting a "not entirely sure what should be changed" vibe. Please feel free to set back to unanswered if/when you're sure of what to change and have a consensus to change it. Izno (talk) 20:56, 14 March 2020 (UTC)
I think it’s pretty obvious what should be changed (this), the only real question is whether it should be changed at all. I say yes, but I think we should have a clear opinion (at least an “I don’t mind”) from TheDJ as well. —Tacsipacsi (talk) 00:38, 15 March 2020 (UTC)
@TheDJ: Yeah, most probably something hackish is needed. Your solution, however, is problematic in narrow cases—if the whole collapsible box is, say, 15em wide, more than the half of the whole width is the margin. I suggest rather using a same-sized floating box on the left size (and precisely setting the width of the right-hand collapse button using TemplateStyles). This way the 4+4em “margin” only applies to the first line; if the title doesn’t fit in one line, further lines are 100% wide (or whatever has been set in the style parameters). We should also pay attention to set these only when JavaScript is available (html.client-js), as the toggle button isn’t present otherwise. —Tacsipacsi (talk) 00:02, 16 March 2020 (UTC)
Oh hey, here I am trying to remove navframe and I stumbled on this discussion :^). Did we ever sort out what we were going to do or have a reasonable belief that the change is a good/neutral change? --Izno (talk) 19:25, 30 June 2020 (UTC)
@Izno: I don’t think anything happened since my March 16 comment. I still think that this hack would work, but haven’t tried it. (As far as I remember, {{navbox}} uses something like this if either the navbar or the collapse button is hidden, by the way.) —Tacsipacsi (talk) 14:21, 1 July 2020 (UTC)
Here I am again, this time to look at the actual problem. Initial glance appears to me that it will more or less work, though I agree it's kind of hacky. Good enough for me I think.
@Izno: I'm pretty sure this change messed up collapsible lists inside of collapsible lists- see Wikipedia:WikiProject_Video_games/New_article_announcements/Archivesbox; the outer template has its "show" button with float:right, but the inner ones now get float:none, making them confusingly show up on the line above the rest of the title. The template use here is minor, but if nested collapsible lists is a supported concept it's a valid bug. Only now noticing this since I interact with that template once a month. --PresN15:11, 8 March 2021 (UTC)
@PresN: Yes, that's caused by this change. I do not know why the Javascript is opinionated about what happens inside a list item. I honestly don't know if nested collapsible lists are or should be supported. We can probably make some local TemplateStyles to fix it if we want. --Izno (talk) 17:41, 8 March 2021 (UTC)
Did some reading, found that it's been that way since 2010 and in fact deliberately inconsistently with how divs work: /* list-items go as wide as their parent element, don't float them inside list items */. --Izno (talk) 20:09, 8 March 2021 (UTC)
Thanks, Izno! Fingers crossed for a solution. PresN, I think we could work something up with a navbox and collapsible lists if worst came to worst. It might be ugly, but probably better than what we have now... -Thibbs (talk) 23:11, 9 March 2021 (UTC)
Well, the solution is basically known and I've implemented a solution local to that template. Still not sure whether to implement here. --Izno (talk) 23:52, 9 March 2021 (UTC)
Thanks Izno; yeah, that template is an ugly maintenance template in a little-seen set of project pages, and could be replaced pretty easily with a non-collapsible box of links if anyone really wanted to. The issue is more if there's a valid use case for nested collapsible lists in article space that this bug is breaking, which I'm not sure there really should be since collapsible templates in the first place get the side-eye for accessibility/mobile reasons. --PresN23:07, 10 March 2021 (UTC)
Perhaps, template needs a nowrap option. In wide tables expanded collapsible list looks messy, as wrapped by every word. So there needs to be an option not to wrap an entry, so each entry will be own line. Elk Salmon (talk) 15:27, 14 January 2022 (UTC)
the "[show]" for the 9 territories is appearing before the title rather than after it. I have tried adding framestyle=border:none; padding:0; with no effect. (Interesting though that the error reproduces here... I thought it would be an infobox artefact.) --𝕁𝕄𝔽 (talk) 18:52, 26 September 2022 (UTC)
This looks like a bad use of collapsible lists, especially since the title of the collapsed list says "9 British territories" but 6 lines are collapsed and 3 are shown. I would redesign this list instead of trying to fix this weird reader-unfriendly usage. – Jonesey95 (talk) 21:21, 26 September 2022 (UTC)
A note: When I reload the page, it briefly flashes the [show] link to the right of "9 British territories" before redrawing it above the title. That's a little odd. I tried making the title much shorter, thinking that maybe there was not enough room in the infobox, but as you demonstrated above, that does not appear to matter. – Jonesey95 (talk) 21:26, 26 September 2022 (UTC)
I suspect that the six plus three behaviour was deliberate, because they are different categories. IMO the list is clutter but clearly some people regard it as of value as it has been there a long time. I hope that the change you made was just temporary because it looks seriously WP:undue. If we can't resolve it in the next couple of days, I will comment it out as it is fully described in the body. For a guess, I suspect that someone tried to go halfway by making it collapsible but the cure seems worse than the disease and it is even worse now. --𝕁𝕄𝔽 (talk) 23:40, 26 September 2022 (UTC)
Whoops, I may have jumped to a wrong conclusion. I see from MOS:hide that such lists are expanded on mobile, so it is probably nothing to do with what you did or didn't do, so I have withdrawn. I will look at again tomorrow. As you say, it is seriously unfriendly so my strong inclination right now is to be bold and remove it. --𝕁𝕄𝔽 (talk) 23:51, 26 September 2022 (UTC)
My edit fixed some stray italic formatting and made the collapsed list match the list's title. I'm fine with the list existing only in the body (perhaps leaving the title in some form in the infobox), but it looks like that article's (very busy!) talk page is the right place to have that discussion. – Jonesey95 (talk) 00:11, 27 September 2022 (UTC)
I would like to be able to apply a style to every item in a list. {{bulleted list}} and family have a |item-style= parameter that does this (also |itemN-style= for just item number N). For example it's not possible to add a hanging indent for legibility to an unbulleted collapsible list, à la {{unbulleted indent list}}. Hairy Dude (talk) 13:57, 6 December 2023 (UTC)