Purpose: Allows a user to upload multiple files to a web form with a single process.

Category: Forms / File Upload

Related jiras:

Process Phase: Drafting

Version: 1.0

 

 

Table of Contents


 

Component description

The Batch File Upload component allows users to upload multiple files of various document types to a web form. This component would be used in situations where a user is expected to upload multiple files to a web form. Rather than uploading each file individually, this component will allow the user to select multiple files and upload all with a single action. This feature will be particularly useful to admin data screens, but should have universal appeal to all types of users.

 

Prototype file viewable here.

Interaction/Behavior of component

This component will have the following user interaction points:

  • Select local files for inclusion in a batch upload process. This can happen one of two ways:
    • Using the operating system file browser to select local files.
    • Drag and drop local files onto a 'target area' of the component.
  • Execute a batch upload of all selected files with a single action.
  • View a listing of uploaded files.
  • Add and edit metadata associated with each individual file (e.g. add comments about a particular file, specify what type of document, etc...).
  • Download previously uploaded files.
  • Remove files that have previously been uploaded

When to use this component:

This component is to be used in situations when the user is required to upload multiple files to a web form.

Problem being solved:

On occasion, users are expected to upload multiple files to a web form. Using the standard file input field (<input type="file">) only allows the user to upload one file at a time. The Batch File Upload component will streamline the process of uploading multiple files to a web form.

Accessibility Considerations

Required Level of Compliance:

In order to meet WCAG 2.0 guidelines, these are some considerations that may apply to this component:

5.3 Do not use tables for layout unless the table makes sense when linearized. Otherwise, if the table does not make sense, provide an alternative equivalent (which may be a linearized version).
5.4 If a table is used for layout, do not use any structural markup for the purpose of visual formatting.
10.2 Until user agents support explicit associations between labels and form controls, for all form controls with implicitly associated labels, ensure that the label is properly positioned.
12.4 Associate labels explicitly with their controls.
6.4 For scripts and applets, ensure that event handlers are input device-independent.
8.1 Make programmatic elements such as scripts and applets directly accessible or compatible with assistive technologies [Priority 1 if functionality is important and not presented elsewhere, otherwise Priority 2.]
9.2 Ensure that any element that has its own interface can be operated in a device-independent manner.
9.3 For scripts, specify logical event handlers rather than device-dependent event handlers.

 

Behavior without script:

If javascript is turned off, this component should degrade to use the standard file input form control by default (<input type="file">).

Accessibility Resources:

View the accessibility report of the JQuery File Upload Plugin here.

 

 

Research and Discussion

Includes usabiity research findings and recommendations, information from the UIM discussion page, links, chapters, articles, etc that supports the design decision.

States

Document all states this component can have. All components will have at least one state, the default state. Repeat the state specification for each additional state. Examples might include: 'Active State', 'Disabled State', etc. Note additional states can refer to the default state to eliminate duplication.

statedescriptionmockup
Initial State

When this component is initialized, a table header with column categories is present. An 'add files' button is also present, allowing the user to initiate a multiple file upload.

Live Example

Add via 'Add Files' ButtonA user may initiate a multi file upload by clicking the 'Add Files' button, located at the upper right of the component. The user will then be presented with the system file browser, from which multiple files can be selected.
Add via 'Drag and Drop'

A user may also initiate a multi file upload by dragging files onto a dropzone, with the following conditions:

  • When no files are present and a user hovers over the component, the table will be faded and a message will be displayed (as an overlay) to inform the user that files may be added by 'drag and drop'.
  • If files have already been uploaded, the 'Drop Files Here' message will only appear on hover WHILE dragging files onto the component.

Live Example

Uploading

Once the user initiates a multi file upload (either by button or drag and drop), the table will temporarily be replaced with a progress bar, with a button to cancel out of the upload process if necessary.

Live Example

Populated (Default View)

Once files are uploaded, the table is populated with information about each file. The default columns are File Name, Size, Date Added, and Actions.

Live Example  

Populated (Custom View)

The component may also be configured as to allow the user to enter additional data about each file that was uploaded.

Live Example

Default State

Markup

                <div style="position: relative;">
                    <table class="table table-condensed uif-hasAddLine uif-has-actions" aria-describedby="">
                        <thead >
                            <tr>
                                <th>File Name</th>
                                <th>Detail 1</th>
                                <th>Detail 2</th>
                                <th>Detail 3</th>
                                <th>Actions/th> 
                            </tr>
                        </thead>
                        <tbody  aria-live="polite" aria-relevant="all" role="alert" style="display:">
                        </tbody>
                    </table>
                    <div class="dropzone" style=""> </div>
                </div>

CSS

The jQuery File Upload Plugin is built to leverage the Bootstrap css framework. Additional css styling needs are not needed.

Script

This component uses the jQuery File Upload Plugin, which is released under the MIT license (approved by the Kuali Foundation). Other dependancies are as follows:

Options 

List any options (properties) this component has.   This would go in developer documentation.

NameOptional?Default Value (if any)Validations (if any)Additional Notes
     

 

Option Sets

List any additional option sets that should be provided for this component. These are configurations of the default values that will be available (component configurations, or beans).

NameValue
  

Keyboard Shortcuts

Keyboard shortcut requirements are undetermined at this time.

Variances

There are no known requirements for variances (i.e. mobile layouts, responsive design) at this time.