-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collapse documentation doesn't mention anything about the class "collapsed" #28648
Comments
It seems that this class isn't used in Bootstrap's CSS and JS either (our JS just toggle this class). I think we need to discuss whether to leave this JS processing. At least, It is possible to apply styles using the |
The
It is used in the Accordion example in Bootstrap 4.0 and 4.5 documentation - see the buttons in https://getbootstrap.com/docs/4.5/components/collapse/#accordion-example In testing the Accordion example, the collapsed class does set aria-expanded to false on collapsed elements, and when un-collapsed, it is removed and aria-expanded is set to true. So it appears to be behaving as expected. However, there is documentation on setting aria-expanded at https://getbootstrap.com/docs/4.5/components/collapse/#accessibility which makes no mention of the existence of the Can |
I've checked the Bootstrap 5 documentation as well, and this issue occurs again there. In Bootstrap 5, Accordion has its own documentation page under Components (rather than a subsection in the Collapse page) and both examples use https://v5.getbootstrap.com/docs/5.0/components/accordion/ |
Near as I can tell, |
As far as I recall, we sometimes use it to negate styles: |
It's used in the collapse component to signal the collapse is done showing. |
In js code, Do we still want to check if it can be omitted? |
The class "collapsed" is added to the trigger element when the target element is hidden, but this feature isn't mentioned anywhere in the collapse documentation. Is this a formally recognized feature?
I'm sure many others, like me, would like to change their triggers style when showing/hiding the target element, and it's not very clear that it's straightforward to do this purely with CSS because of the collapsed class. It would be helpful to add a few words about this to confirm (or deny) that this is a feature that can and should be used.
The text was updated successfully, but these errors were encountered: