Page markup

This product provides a JavaScript module as a Zope browser resource. Any Zope or Plone project should be able to use this product as-is by placing the following line in a page template.

<script type="text/javascript"
        defer="true"> </script>

Users of other systems are invited to copy the file gs/content/js/disclosure/browser/javascript/disclosure.js out of this product.

A minified version of the code is also available:

<script type="text/javascript"
        defer="true"> </script>

Widget markup

The markup for each disclosure button contains of a <div> element for the entire widget, a paragraph that contains a button, and another <div> for the content to show or hide

<div class="disclosureWidget">
    <a class="disclosureButton" role="button"
   <div id="show-hide-id"
        This is hidden by default.

CSS classes are used to mark the components of the disclosure widget:

  • disclosureWidget for the main widget.
  • disclosureButton for the button.
  • disclosureShowHide for the content to show or hide.

The style attribute on the content determines if the content is shown (display:block;) or hidden (display:none;) by default.

Aria:The markup above shows an aria-controls and role attribute on the button; there is an id attribute on the content container. All are good practice, but unnecessary (unless you rely on accessibility technology, when they become highly important). The system will add an aria-hidden attribute to the content container as necessary