diff --git a/docs/_includes/js/collapse.html b/docs/_includes/js/collapse.html index 4e7fb450a6..5239256a62 100644 --- a/docs/_includes/js/collapse.html +++ b/docs/_includes/js/collapse.html @@ -17,7 +17,7 @@
You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.
Be sure to add aria-expanded to the control element. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of aria-expanded="false". If you've set the collapsible element to be open by default using the in class, set aria-expanded="true" on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.
aria-expanded
aria-expanded="false"
in
aria-expanded="true"
Additionally, if your control element is targetting a single collapsible element – i.e. the data-target attribute is pointing to an id selector – you may add an additional aria-controls attribute to the control element, containing the id of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.
data-target
id
aria-controls
The collapse plugin utilizes a few classes to handle the heavy lifting:
These classes can be found in component-animations.less.
component-animations.less
Just add data-toggle="collapse" and a data-target to element to automatically assign control of a collapsible element. The data-target attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.
data-toggle="collapse"
collapse
Just add data-toggle="collapse" and a data-target to the element to automatically assign control of a collapsible element. The data-target attribute accepts a CSS selector to apply the collapse to. Be sure to add the class collapse to the collapsible element. If you'd like it to default open, add the additional class in.
To add accordion-like group management to a collapsible control, add the data attribute data-parent="#selector". Refer to the demo to see this in action.
data-parent="#selector"
panel