Skip to content

deltanet/adapt-contrib-accordion-audio

 
 

Repository files navigation

adapt-contrib-accordion-audio

accordion in action Accordion audio is a presentation component bundled with the Adapt framework.

The component displays a vertically stacked list of headings. Each heading is associated with a collapsible content panel. Clicking a heading toggles the visibility of its content panel. Content panels may contain text and/or an image.

Installation

Accordion audio must be manually installed in the adapt framework and authoring tool.

Settings Overview

The attributes listed below are used in components.json to configure Accordion audio, and are properly formatted as JSON in example.json. Visit the Accordion audio wiki for more information about how they appear in the authoring tool.

Attributes

core model attributes: These are inherited by every Adapt component. Read more.

_component (string): This value must be: accordion-audio.

_classes (string): CSS class name to be applied to Accordion audio’s containing div. The class must be predefined in one of the Less files. Separate multiple classes with a space.

_layout (string): This defines the horizontal position of the component in the block. Acceptable values are full, left or right.

instruction (string): This optional text appears above the component. It is frequently used to guide the learner’s interaction with the component.

_shouldCollapseItems (boolean): Used to control the auto-collapse of other expanded Accordion items whenever an item is clicked/expanded. Defaulted to 'true'

_shouldExpandFirstItem (boolean): Used to control if the first item will expanded by default. Defaulted to 'false'

_setCompletionOn (string): Determines when the component registers as complete. Acceptable values are "allItems" and "inview". "allItems" (the default) requires the learner to view every single accordion item; "inview" requires only that the component has been viewed (i.e. passed completely through the browser viewport).

_items (array): Multiple items may be created. Each item represents one element of the accordion and contains values for title, body, _graphic, and _classes.

title (string): This text is displayed as the element's header. It is displayed at all times, even when the body has been collapsed.

body (string): This content will be displayed when the learner opens this accordion element. It may contain HTML.

_graphic (object): An optional image which is displayed below the item body when the learner opens this accordion element. It contains values for src, alt, and attribution.

src (string): File name (including path) of the image. Path should be relative to the src folder (e.g., course/en/images/c-45-1.jpg).

alt (string): The alternative text for this image. Assign alt text to images that convey course content only.

attribution (string): Optional text to be displayed as an attribution. By default it is displayed over the bottom of the image. Adjust positioning by modifying CSS. Text can contain HTML tags, e.g., Copyright © 2015 by <b>Lukasz 'Severiaan' Grela</b>.

_classes (string): An optional class that will be applied to the Accordion Item. Supported classes are "align-image-left" and "align-image-right" which aligns the item image to the left or right in desktop view. On smaller screens the item image defaults underneath the item body text. Additional classes can be used but they must be predefined in one of the Less files. Separate multiple classes with a space.

Accessibility

Accordion audio has been assigned a label using the aria-label attribute: ariaRegion. This label is not a visible element. It is utilized by assistive technology such as screen readers. Should the region's text need to be customised, it can be found within the globals object in properties.schema.

Limitations

No known limitations.


Version number: 7.0.0 adapt learning logo Framework versions: 5.20.1+ Author / maintainer: Adapt Core Team / DeltaNet Accessibility support: WAI AA RTL support: Yes Cross-platform coverage: Chrome, Chrome for Android, Firefox (ESR + latest version), Edge, IE11, Safari 12+13 for macOS/iOS/iPadOS, Opera

About

An accordion component that displays clickable titles, which reveal display text

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 80.8%
  • Less 19.2%