CSS Components

Icons


How to use


Icons indicate that the user can take an action, or they direct attention to an area or message. Use icons to convey conventional meanings and associations. If an icon isn’t universally known it should be accompanied by text to provide clarity.

Icons’ class names describe their usage or associated action. For icons performing the function of a button, the best practice is to present the icon with accompanying text, within a button appearance. The button appearance helps indicate that the element can be tapped to take an action, and the text clarifies what that action is.


Color


Financial Institutions can choose a link/icon color with a branding tool. To retain a visual contrast level consistent with the default design of Online Banking, the selected colors must meet level AA of WCAG 2.0. This site offers a way to test and adjust colors: http://snook.ca/technical/colour_contrast/colour.html

If the Financial Institution has not selected a link/icon color, then the icon must use one of the HEX values below to meet accessibility guidelines:
#333333, #666666, or #FFFFFF (if on a dark background).


SVG Icons


These SVG icons should be displayed in default colors or Financial Institution’s link/icon color.

  • accounts
  • add
  • alert-fill
  • alert-outline
  • arrow
  • back
  • bill-pay
  • calendar
  • call
  • check-image
  • check-mark
  • computer
  • delete
  • down
  • edit
  • email
  • forward
  • generic
  • help
  • help-outline
  • hide
  • info
  • notifications
  • order
  • pay-people
  • print
  • recycle
  • refresh
  • rename
  • repeat
  • rewards
  • search
  • security
  • settings
  • show
  • sort
  • stop-payment
  • text
  • text-mobile-alerts
  • text-mobile-alerts-outline
  • transfer-money
  • up

The icons shown below should not be modified to another color.

  • alert-error
  • alert-warning
  • turbo-tax
  • scheduled
  • success
  • page-loader
  • small-loader
  • close

A yellow color indicates warning; “pay attention”.

Green indicates success.

Red indicates error.


Icons Size


There are three defined icon sizes: small, medium and large. You can adjust the SVG size if necessary to meet specific design goals.

  • Small (sm)
  • Default
  • Large (lg)

16px X 16px
(field level messages)

1 em
(most common use)

32px X 32px
(not common)

Importing the SVG sprite


In order to use SVG icons that we provide, our SVG icon sprite file must be loaded. You can do this by adding the following to your HTML page:


<script src="https://resource.digitalinsight.com/leapfrog/[version]/js/load-svg.min.js"></script>
<script>loadSVG('https://resource.digitalinsight.com/leapfrog/[version]/img/svg/icons.svg');</script>
                    

Note that you can call loadSVG() whenever you want, so long as it's after the load-svg script has been loaded. Ideally it should be called before the page is rendered, otherwise users may see a flash of no icons.

Using the icons


You can use the icons by creating an <svg> tag with a <use> tag inside inside of it. The xlink:href attribute of the <use> tag should be set to the name of the icon, preceded by a hash. See the design tab for a list of available icons, as well as what names to use for which icons.

Example

Info Icon This is an example of how to use SVG icons.

<svg role="img" class="di-svg" aria-labelledby="infoIconTitle1">
    <title id="infoIconTitle1">Info Icon</title>
    <use xlink:href="#info"></use>
</svg>
This is an example of how to use SVG icons.
                    

By default, the size of the icon will increase with the font size. If you want to keep the size of the icon constant, you can use the sm and lg classes. They will set the size of the icon to be 16px or 32px, respectively. In the example below, the first two icons are the same size because the font size happens to be 16px.

Example

Info Icon Info Icon Info Icon An example of icon sizes.

<svg role="img" class="di-svg sm" aria-labelledby="infoIconTitle2">
    <title id="infoIconTitle2">Info Icon</title>
    <use xlink:href="#info"></use>
</svg>
<svg role="img" class="di-svg" aria-labelledby="infoIconTitle3">
    <title id="infoIconTitle3">Info Icon</title>
    <use xlink:href="#info"></use>
</svg>
<svg role="img" class="di-svg lg" aria-labelledby="infoIconTitle4">
    <title id="infoIconTitle4">Info Icon</title>
    <use xlink:href="#info"></use>
</svg>
An example of icon sizes.
                    

For loaders, you will need to add the rotate class in order to get them to spin.

Example

Small Loading Icon Loading...

<svg role="img" class="di-svg rotate" aria-labelledby="loaderIconTitle1">
    <title id="loaderIconTitle1">Small Loading Icon</title>
    <use xlink:href="#small-loader"></use>
</svg>
Loading...
                    

Accessibility


In order for your icons to be fully accessible, you should make sure to follow these guidelines:

  • Add the role="img" attribute to the <svg> tag.
  • Provide a <title> as the first child of the <svg> and give it a unique id.
  • Include a <desc> as the next child if your usage of the icon would benefit from one. Give it a unique id as well.
  • Add an aria-labelledby attribute to the <svg> tag with the value set to the ids of the <title> and <desc> (if present) tags.
The examples above show what it looks like if you just provide a title, but here's an example that uses a description as well:

Example

Fees: $1.23 Help Icon Click to learn more about how fees are calculated

Fees: $1.23
<a href="javascript:void(0);">
    <svg role="img" class="di-svg" aria-labelledby="infoIconTitle5 infoIconDescription5">
        <title id="infoIconTitle5">Help Icon</title>
        <desc id="infoIconDescription5">Click to learn more about how fees are calculated</desc>
        <use xlink:href="#help"></use>
    </svg>
</a>
                    

Buttons


Sizes


There are two button sizes. The default button size is 42px. The small button has a height of 35px and is used when creating a complex form with space constraints.


States Fill & Stroke Specifications




State Primary Secondary Tertiary Button with icon Button in a field Other
Normal Dark FI primary accent Color Background is FI color with a gradient overlay:
Top: 0% #000000
Bottom: 18% #000000
Text color: #FFFFFF
Gradient fill;
Top:#FFFFFF
Bottom:#DDDDDD
Border:#ACACAC
Text color: #333333
Solid fill: #FFFFFF
Border: #ACACAC
Text color: #333333
Same as secondary button Square corners (no border radius)
Otherwise same as Secondary
Square corners (no border radius)
Solid fill: #F7F7F
Text color: #333333
Light FI primary accent Color Background is FI color with a gradient overlay:
Top:#FFFFFF at 0% opacity
Bottom:#FFFFFF at 18% opacity
Text color: #333333
Hover/Tap Dark FI primary accent Color Solid fill overlays FI color:
#000000 at 25% opacity
Solid fill: #CCCCCC
Border: #ACACAC
Solid fill: #CCCCCC
Border: #ACACAC
Solid fill: #CCCCCC
Light FI primary accent Color Solid fill overlays FI color:
#FFFFFF at 25% opacity
Disabled 40% opacity
Focus Visual style is the same as Primary state. Use browser or device styles for focus. Do not reset / nullify outline or other visual cues indicating focus.
Border radius (all states) 2px None (square corners)

Button Interaction Details


Primary vs. Secondary Buttons

Primary: Use for the primary action that the user must take on the page.

Primary and secondary: Use both when there is a choice between two actions and one action can be recommend over the other, and/or the secondary button is used to cancel the action.

If multiple actions have equal value, then use all primary buttons.

Tertiary buttons : Used when they are not the main action on the page.


Large vs. Small Buttons

Use the large button sizes almost exclusively in designs. Exceptions are when there is not enough room on the page for the 42px height (Example: inside a table)

If there are multiple choices for non-primary actions on the page, then use the tertiary button for those actions. See examples below.

*Critical tasks should not depend on disabled buttons in order for the user to understand the action.


Other Types of Button


Input with dropdown


Toggle Buttons


The Toggle Button is divided into two segments and behaves as a single-selection control, allowing the user to click and immediately initiate an action.

The toggle state allows you to highlight the current state. Ex.: Yes/No, On/Off. It should use the FI primary accent color or the default color of #666666 in the on state.


Links as buttons

The link default color is #0055CC, and should use the financial institution’s link color

A link is used to either take action or initiate an action.

Links should be used when there are multiple actions to be taken on the page and using a push button would make the page visually heavy.

  • For accessibility, links are underlined or have an icon near them to indicate that it is a tappable area.
  • When the link is selected (hover, focus, or active), the underline disappears.
  • Links should follow the branding color for links, which is the financial institution’s primary accent color (default color #0055CC).
  • The minimum font size for links is .875 em and the maximum is 1.125 em.
  • Icons can be placed at the right of the link, but they are not mandatory.
  • Labeling rules apply to link buttons as well (shown later).
  • For link buttons to be tablet-friendly, the padding around the link should be big enough for a user to select by touch.
  • Height for the target area should be 42px.

Stand alone link

Link

The padding around the stand-alone link (when not used as a part of another link or non-linked text) should be large enough for the user to select by touch without tapping something else accidentally; 20px minimum on each side of the tappable area.


Link with icon

Example of a link with an icon using HEX color #333333


Example of a link with an icon using the link color


Icons as buttons

  • A standalone icon works best when the action can be represented by a symbol that is well understood. An alt value is required.
  • If there is any doubt about an icon’s meaning, use a text next to it to clarify.
  • An icon may have a hover state, but it is not mandatory.
  • A common example of a icon used as a button is the close icon on overlays.
  • Another example is the help icon.

Other Button Details


The space between buttons is always equal to 10px, regardless of the button type and size.

The width of the button is a minimum of 20px from the centered text to each edge.

At the XS breakpoint, the buttons are 100% width.


The width of the button is a minimum of 20 px from the centered text to each edge.


At the XS breakpoint the buttons are 100% width.


Processing

When a process takes several seconds, the submit button should be disabled until the process is complete and the user receives confirmation feedback.


ON OFF

Examples


How to use buttons on an overlay

They are left-aligned to the bottom left corner of the overlay.

Overlays also use the close icon button placed in the top right corner. This usually closes the overlay without any confirmation.


For accessibility:
When an overlay opens, the default focus is on the close button. Tab order moves from close, to the overlay content, to the primary button, and finally to the secondary button. The recommended practice is that source order determines the path, as opposed to changing the tab index of elements.





Primary :
Secondary :
Tertiary :
 
Primary Disabled:
Secondary Disabled:
Tertiary Disabled:
 
Primary Small:
Secondary Small:
No Small Tertiary Button:
 
Primary Small Disabled:
Secondary Small Disabled:
 
 
Primary With Icon:
Secondary With Icon:
Other :
 
Primary Small With Icon:
Secondary Small With Icon:
Other Small :
 
Primary Small With Icon Disabled:
Sec. Small With Icon Disabled:
Other Small Disabled:
 
 
<button type="button" class="btn {sm} btn-{other | primary | secondary | tertiary } {disabled} {xs-width-100 / btn-block}">Label Here</button>
 
Tip: 'xs-width-100' can be used to make button or other component cover 100% of with in XS break point.
 
 
Basic :
Basic Disabled:
 
Basic Small:
Small Disabled:
 
 

                          <div class="input-group {sm} {disabled}">
                          <input type="text" class="form-control" placeholder="Filter On ...">
                          <span class="input-group-btn">
                          <button class="btn btn-secondary" type="button">
                          <span class="glyphicon glyphicon-filter" aria-hidden="true"></span>
                          </button>
                          </span>
                          </div>
                        
 
 
 
Basic :
Small :
 
 
                          - sm: optional, if want to have small version

                          

                            <div class="input-group {sm}">
                            <input type="text" class="form-control" aria-label="...">
                            <div class="input-group-btn">
                            <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span>
                            </button>
                            <ul class="dropdown-menu dropdown-menu-right">
                            <li class="active"><span>List Option 1</span></li>
                            <li><span>List Option 2</span></li>
                            <li><span>List Option 3</span></li>
                            <li><span>List Option 4</span></li>
                            <li><span>List Option 5</span></li>
                            <li><span>List Option 6</span></li>
                            </ul>
                            </div>
                            </div>
                          
                        

Messaging and Notifications


Visual Specifications


There are four types of page-level messages: Error, Warning, Success, and Informational.

Messages typically remain on screen until the user navigates away from or refreshes the page. If the user continues to interact with the form after successful completion of an action, it may be necessary to have the message disappear after five seconds.



The most common placement for these types of messages is 20px below the line, under the main heading.


If the form is very long, the message can be placed directly above the buttons so the user can view the message without having to scroll to the top.

L, M, S


XS


Other types of messages and notifications


Information unavailable, warning, or zero data state


Overlay messaging

L, M, S


XS


Examples


Page level message or notification example


Information unavailable


Loading


Page failure on loading


Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.

                    <div class="media alert alert-{success | info | danger | warning | message}">
                    <div class="media-left"></div>
                    <div class="media-body">
                    <strong>Hightlight!</strong> You can provide detail message here.
                    </div>
                    </div>
 
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.

                      <div class="media alert alert-{success | info | danger | warning | message}">
                      <div class="media-body">
                      <strong>Hightlight!</strong> You can provide detail message here.
                      </div>
                      </div>
 
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
Payments were scheduled. You can cancel until it processes.
 
<div class="media message message-{success | info | danger | warning }">
                        <div class="media-left"></div>
                        <div class="media-body">
                        <strong>Hightlight!</strong> You can provide detail message here.
                        </div>
                        </div>
 

Drop Down


Visual Specifications


There are two sizes for drop downs: default and small. The use of each depends on size constraints on the page. The only items that change between the default and small size drop downs are the height and the font size.


Main drop down style (over white background)


Icons and text are centered vertically. Text: Arial 16px, #333333


Main drop down style (over gray background)


Variation


Dropdown toggle as a link

Font size is determined by hierarchy and the space on the page.

The font color is the financial institution’s primary accent color. The drop-down arrow is provided as a vector image in the icons file. Please add the financial institution’s color to that file and save it as a .png.

If the financial institution’s primary color is not available, the default text color is #333333.



Complex Dropdown menu

Dropdown menu can have addtional information pertaining to the item shown below it.

Each row is separated by a line.

Example shows the component for account balances and any addtional information required.



All fonts & paddings stay the same independent of screen size. Please note that the VERTICAL padding specs indicate padding in CSS (not the typical padding as measured between text). This is in order to take in account line height.



Dropdown menu with headers

Used when the menu options in the dropdown need some sort of logical grouping

Headers cannot be selected. They are just titles.

The header background color takes the FI branding color A at 10%.



Dropdown menu with footer

Typically has a action show as a link. eg: Allowing user to add item to the list or manage the list etc.

Label name needs to reflect the action the user will take. E.g.: Add a new payee or Add an account or Manage categories etc.

Clicking on the link it will close the dropdown menu and trigger the action.

Scrolling the list will not scroll the footer. It is fixed at the bottom.

Icon to the left of the link is optional.



Factors That Effect Drop Down Width


Large, Med, Small

The width of the control is determined by the the location of the drop-down on the form. The minimum width of the drop-down is set by the size of the control. The drop-down control should not change its width, however there are a few use cases where the text in the control needs to be truncated or ellipsed depending on content.

Ideally the control and drop-down would remain the same width as the control; longer options will wrap in the row.

Exception to these rules: the drop down can be wider than the control width if the space is available - in this case the designer will need to set a max width for the large, med, and small breakpoints.


XS Design

The control is a tappable row, and the drop-down menu becomes a slide panel. The same rules regarding truncation on the control and wrapping on the menu apply to the XS breakpoint.

Exception to these rules: Avoid slide panels on top of slide panels in the design. In complex forms when there are many form elements, you may need to use the same drop-down control and menu that is used in the LG, MD, and S breakpoints.


Accessibility


All images must have an alt attribute (even if the function of the image is purely decorative and alt=“”). When an image has meaning to a sighted user, convey this with the alt attribute if possible. Avoid images that contain text; if they do, the alt value must contain the same string of text.


Default :
 
Variation Default Months :
Variation Default Phone Numbers :
 
Default small :
Variation Default small :
 
Default and disabled :
Default small and disabled :
 

Example Variation as default Link:

Variation as default Link small:
 
 

Example Variation as Fi Link:

Variation as Fi Link small:
 
 

Background variation on gray :


Background variation on gray Small :


 
Usage :
                  - on-gray | link: optional, variation support look like link or on Gray background.
                  - sm: optional, if want to have small version
                  - active: optional, if want to have list item selected state.
                  - disabled: optional, if disabled the control is required.

                  
                    <div class="di dropdown {on-gray | link | fi link} {sm}">
                    <button class="toggle" id="dLabel1" type="button" data-toggle="dropdown"
                    aria-haspopup="true" aria-expanded="false" title="Select One ...">
                    <span class="ddlabel">Select One ...</span><span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel1">
                    <li class="{active}"><span>List Option 1</span></li>
                    <li><span>List Option 2</span></li>
                    </ul>
                    </div>

Toggle



Visual Specifications


  • Toggles are used for an option that the user can turn on or off. For example, Yes/No or On/Off. Usually a label is associated with this element which is placed to the left or top of it.
  • There are two sizes for toggles: small and large. The use of each depends on the size constraints of the page.
  • The selected color for the toggle when turned “ON” is the financial institution’s primary accent color, if this color information is not available then the default color is #666666. Details are covered in the Branding section.
  • Use the default browser focus state.


Hover & Disabled States


When the inset area of the toggle button is hovered:


When the switch is hovered:


When the toggle switch is disabled:


Transition


The switch transition duration from side to side is 0.3s, easeOutQuint.

The background color fades between the ON/YES background color and the OFF/NO background color over the period of the transition.


Accessibility


  • The element acting as a toggle button should be focusable and selectable with the keyboard.
  • It must have role defined, so that it is announced to assistive technology.
  • ARIA-checked needs the right state (true or false), so it is announced when the state changes.
  • When assistive technology is announcing the element, it should already read out the label/action associated with it. For example, “Turn on eBills” OR “Need ACH Payments - Yes. Click to say No”

Default

On/Yes Enabled State
ON OFF
Off/No Enabled State
ON OFF
On/Yes State, Disabled
ON OFF
Off/No State, Disabled
ON OFF

Small

On/Yes Enabled State
ON OFF
Off/No Enabled State
ON OFF
On/Yes, Disabled
ON OFF
Off/No, Disabled
ON OFF
 
               - sm: optional, for small version
               - active: optional, sets the switch to On/Yes state.
               - disabled: optional, disables the control.
               
                <div class='di-toggle-switch-container {sm}'>
                <div class='di-toggle-switch {active} {disabled}'>
                <span class='label-on '>ON</span>
                <span class='label-slider' > </span>
                <span class='label-off '>OFF</span>
                </div>
                </div>

Radio Buttons



There are two sizes for radio buttons: small and large. The use of each depends on the size constraints of the page.

Radio buttons are used when there is a list of two or more options that are mutually exclusive and the user may select only one choice. In other words, clicking a non-selected radio button will deselect whatever other button was previously selected in the list.

Use the default browser focus state.



Padding between radio-button and its label will be 10px for XS and 15px for other break points.



If there are two or more consecutive radio buttons then the padding between them will be 30px





 
 
                 - sm: optional, if want to have small version
                 - disabled: optional, if disabled the control is required.
                 
                  <label class="di-radio">
                  <input type="radio" name='radioFoo' {disabled}/>
                  <span class="lbl {sm}"> Radio Foo Label</span>
                  </label>
 

Small

 
                   - sm: optional, if want to have small version
                   - disabled: optional, if disabled the control is required.
                   
                    <label class="di-checkbox">
                    <input type="checkbox" name='checkboxFoo' {disabled}/>
                    <span class="lbl {sm}"> Check Box Foo Label</span>
                    </label>

Checkbox




Visual Specifications


There are two sizes for check boxes: small and large. The use of each depends on the size constraints of the page.

Checkboxes are used when there are lists of options and the user may select any number of choices, including none, one, or several. In other words, each checkbox is independent of all other checkboxes on the list, so checking one box does not uncheck the others. A stand-alone checkbox can be used for a single option that the user can turn on or off.

Use the default browser focus state.


Padding between checkbox and its label will be 10px for XS and 15px for other break points.


If there are two or more consecutive check boxes then the padding between them will be 30px


Accessibility


To attain the correct styling:

  • The element acting as a checkbox should be focusable and selectable with the keyboard
  • It must have role=“checkbox”, so that it is announced to assistive technology as a checkbox
  • Aria-checked needs the right state (true or false), so it is announced when the state changes

Additional information:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/

Using_the_checkbox_role
http://webaim.org/techniques/forms/controls#checkbox


 
 
                 - sm: optional, if want to have small version
                 - disabled: optional, if disabled the control is required.
                 
                  <label class="di-radio">
                  <input type="radio" name='radioFoo' {disabled}/>
                  <span class="lbl {sm}"> Radio Foo Label</span>
                  </label>
 

Small

 
                   - sm: optional, if want to have small version
                   - disabled: optional, if disabled the control is required.
                   
                    <label class="di-checkbox">
                    <input type="checkbox" name='checkboxFoo' {disabled}/>
                    <span class="lbl {sm}"> Check Box Foo Label</span>
                    </label>

Modal



Visual Specifications


Modal dialogs are used when the user must take or confirm an action. The interface limits interaction to either completing or canceling the current task. Use modal dialogs sparingly for critical tasks or confirming irreversible actions. Using the full screen is preferable to an overlay at the XS size, as an overlay may cause scrolling issues on mobile devices.

Modal is horizontally centered in the viewport, and positioned 20px below the top of the viewport. If displayed within an iframe, it is 20px from the top of the iframe.


Screen size Default Padding
Large 30 px, 30px, 40px, 30px
Medium 30 px, 30px, 40px, 30px
Small 20 px, 20px, 30px, 20px

Example



Accessibility


  1. Modals: On close, return focus to the element that activated the overlay.
  2. Close buttons: Images that function as a button (such as an image of an “X” to represent “Close”) must include a text equivalent. If the text equivalent is hidden from view, it must remain available for assistive technology (e.g. using text-indent to move it off screen). If it’s an img element acting as a button, it also needs an ARIA role.
  3. All WAI-ARIA enabled dialog boxes should be modal. A modal dialog prevents the user from setting the focus outside of the dialog until the dialog is closed. Mouse clicks outside of the dialog must be ignored, and the user must not be able to tab into or out of the dialog itself.
  4. All images must have an alt attribute (even if the function of the image is purely decorative and alt=“”). When an image has meaning to a sighted user, convey this with the alt attribute if possible. Avoid images that contain text; if they do, the alt value must contain the same string of text.
  5. Indicate: Focus; the easiest way to achieve this is to not remove default styling for the outline property.

 

                  <div class="modal fade" id="modalExample2" tabindex="-1" role="dialog" aria-labelledby="modalExample2">
                  <div class="modal-dialog" role="document">
                  <div class="modal-content">
                  <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                  <h2 class="modal-title">Heading</h2>
                  </div>
                  <div class="modal-body">
                  <div class="di-callout xs-void">
                  <h2>Subheading Arial 18px #333333</h2>
                  <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span>
                  </div>
                  </div>
                  <div class="modal-footer">
                  <button type="button" class="btn btn-primary">OK</button>
                  <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                  </div>
                  </div>
                  </div>
                  </div>
                
 

Date Picker


Visual Specifications


The calendar can open in any direction depending on the screen space. While the calendar is open, focus should be restricted within the calendar. Date select should occur with the use of the enter button or the spacebar.

The user can type in the date or use the calendar to select the date. They should be able to type in 08-22-16, or 08/22/16, or 08/22/2016. On blur, the format should automatically change to mm/dd/yy.

If they have chosen a language where the day is listed first, then the format should read dd/mm/yy.

If today’s date is selected, it should be green with the financial institution’s color as a line around the green.





Accessibility


  1. Indicate: Focus; the easiest way to achieve this is to not remove the default styling for the outline property.
  2. All images must have an alt attribute (even if the function of the image is purely decorative and alt=“”). When an image has meaning to a sighted user, convey this with the alt attribute if possible. Avoid images that contain text; if they do, the alt value must contain the same string of text.
  3. On close, return the focus to the element that activated the calendar.
  4. Close buttons: Images that function as a button (such as an image of an “X” to represent “Close”) include a text equivalent. If the text equivalent is hidden from view, it must remain available for assistive technology (e.g. using text-indent to move it off screen). If it’s an img element acting as a button, it also needs a ARIA role


Select Date

« January 2017 »
S M T W T F S
25 26 27 28 29 30 31
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 1 2 3 4


             



             <!-- Datepicker Start  -->

             <div class="span4 col-md-4 datepicker-container">

               <div class="top">

                 <div class="section heading">

                   <h3>Select Date</h3>

                 </div>

                 <div tabindex="0" class="section close">

                   <span id="Close" class="di-svg" aria-labelledby="Close" style="fill: currentcolor; display: inline-block; width: 15px;">

                     <svg x="0px" y="0px" viewBox="0 0 18 18" enable-background="new 0 0 18 18" focusable="false">
                       <title></title><desc></desc>

                       <g>
                        <polygon points="18,2.5 15.5,0 9,6.5 2.5,0 0,2.5 6.5,9 0,15.5 2.5,18 9,11.5 15.5,18 18,15.5 11.5,9  "></polygon>
                      </g>
                    </svg>

                  </span>

                </div>
              </div>






              <div>
                <div class="datepicker">
                  <!-- <div class="datepicker datepicker-inline"> -->
                  <div class="datepicker-days" style="display: block;">
                    <table class="table table-condensed">
                     <thead>
                      <tr>
                       <th colspan="7" class="datepicker-title" style="display: none;"></th>
                     </tr>
                     <tr>
                       <th class="prev" style="visibility: visible;">«</th>
                       <th colspan="5" class="datepicker-switch">January 2017</th>
                       <th class="next" style="visibility: visible;">»</th>
                     </tr>
                     <tr>
                       <th class="dow disabled">S</th>
                       <th class="dow">M</th>
                       <th class="dow">T</th>
                       <th class="dow">W</th>
                       <th class="dow">T</th>
                       <th class="dow">F</th>
                       <th class="dow">S</th>
                     </tr>
                   </thead>
                   <tbody>
                    <tr>
                     <td class="day highlighted disabled-date disabled old">25</td>
                     <td class="day old">26</td>
                     <td class="day old">27</td>
                     <td class="day old">28</td>
                     <td class="day old">29</td>
                     <td class="day old">30</td>
                     <td class="day highlighted old">31</td>
                   </tr>
                   <tr>
                     <td class="day highlighted disabled-date disabled">1</td>
                     <td class="day">2</td>
                     <td class="day">3</td>
                     <td class="day">4</td>
                     <td class="day">5</td>
                     <td class="day">6</td>
                     <td class="day highlighted">7</td>
                   </tr>
                   <tr>
                     <td class="day highlighted disabled-date disabled">8</td>
                     <td class="day">9</td>
                     <td class="day">10</td>
                     <td class="day">11</td>
                     <td class="day">12</td>
                     <td class="day">13</td>
                     <td class="day highlighted">14</td>
                   </tr>
                   <tr>
                     <td class="day highlighted disabled-date disabled">15</td>
                     <td class="day">16</td>
                     <td class="day">17</td>
                     <td class="day">18</td>
                     <td class="day">19</td>
                     <td class="day">20</td>
                     <td class="day highlighted">21</td>
                   </tr>
                   <tr>
                     <td class="day highlighted disabled-date disabled">22</td>
                     <td class="day">23</td>
                     <td class="day">24</td>
                     <td class="day">25</td>
                     <td class="day">26</td>
                     <td class="day">27</td>
                     <td class="day highlighted">28</td>
                   </tr>
                   <tr>
                     <td class="day highlighted disabled-date disabled">29</td>
                     <td class="day">30</td>
                     <td class="day">31</td>
                     <td class="day new">1</td>
                     <td class="day new">2</td>
                     <td class="day new">3</td>
                     <td class="day highlighted new">4</td>
                   </tr>
                 </tbody>
                 <tfoot>
                  <tr>
                   <th colspan="7" class="today" style="display: none;">Today</th>
                 </tr>
                 <tr>
                   <th colspan="7" class="clear" style="display: none;">Clear</th>
                 </tr>
               </tfoot>
             </table>
           </div>
           <div class="datepicker-months" style="display: none;">
            <table class="table table-condensed">
             <thead>
              <tr>
               <th colspan="7" class="datepicker-title" style="display: none;"></th>
             </tr>
             <tr>
               <th class="prev" style="visibility: visible;">«</th>
               <th colspan="5" class="datepicker-switch">2017</th>
               <th class="next" style="visibility: visible;">»</th>
             </tr>
           </thead>
           <tbody>
            <tr>
             <td colspan="7">
              <span class="month focused">Jan</span>
              <span class="month">Feb</span>
              <span class="month">Mar</span>
              <span class="month">Apr</span>
              <span class="month">May</span>
              <span class="month">Jun</span>
              <span class="month">Jul</span>
              <span class="month">Aug</span>
              <span class="month">Sep</span>
              <span class="month">Oct</span>
              <span class="month">Nov</span>
              <span class="month">Dec</span></td>
            </tr>
          </tbody>
          <tfoot>
            <tr>
             <th colspan="7" class="today" style="display: none;">Today</th>
           </tr>
           <tr>
             <th colspan="7" class="clear" style="display: none;">Clear</th>
           </tr>
         </tfoot>
       </table>
     </div>
     <div class="datepicker-years" style="display: none;">
      <table class="table table-condensed">
       <thead>
        <tr>
         <th colspan="7" class="datepicker-title" style="display: none;"></th>
       </tr>
       <tr>
         <th class="prev" style="visibility: visible;">«</th>
         <th colspan="5" class="datepicker-switch">2010-2019</th>
         <th class="next" style="visibility: visible;">»</th>
       </tr>
     </thead>
     <tbody>
      <tr>
       <td colspan="7">
         <span class="year old">2009</span>
         <span class="year">2010</span>
         <span class="year">2011</span>
         <span class="year">2012</span>
         <span class="year">2013</span>
         <span class="year">2014</span>
         <span class="year">2015</span>
         <span class="year">2016</span>
         <span class="year focused">2017</span>
         <span class="year">2018</span>
         <span class="year">2019</span>
         <span class="year new">2020</span></td>
       </tr>
     </tbody>
     <tfoot>
      <tr>
       <th colspan="7" class="today" style="display: none;">Today</th>
     </tr>
     <tr>
       <th colspan="7" class="clear" style="display: none;">Clear</th>
     </tr>
   </tfoot>
 </table>
</div>
<div class="datepicker-decades" style="display: none;">
  <table class="table table-condensed">
   <thead>
    <tr>
     <th colspan="7" class="datepicker-title" style="display: none;"></th>
   </tr>
   <tr>
     <th class="prev" style="visibility: visible;">«</th>
     <th colspan="5" class="datepicker-switch">2000-2090</th>
     <th class="next" style="visibility: visible;">»</th>
   </tr>
 </thead>
 <tbody>
  <tr>
   <td colspan="7"><span class="decade old">1990</span><span class="decade">2000</span><span class="decade">2010</span><span class="decade">2020</span><span class="decade">2030</span><span class="decade">2040</span><span class="decade">2050</span><span class="decade">2060</span><span class="decade">2070</span><span class="decade">2080</span><span class="decade">2090</span><span class="decade new">2100</span></td>
 </tr>
</tbody>
<tfoot>
  <tr>
   <th colspan="7" class="today" style="display: none;">Today</th>
 </tr>
 <tr>
   <th colspan="7" class="clear" style="display: none;">Clear</th>
 </tr>
</tfoot>
</table>
</div>
<div class="datepicker-centuries" style="display: none;">
  <table class="table table-condensed">
   <thead>
    <tr>
     <th colspan="7" class="datepicker-title" style="display: none;"></th>
   </tr>
   <tr>
     <th class="prev" style="visibility: visible;">«</th>
     <th colspan="5" class="datepicker-switch">2000-2900</th>
     <th class="next" style="visibility: visible;">»</th>
   </tr>
 </thead>
 <tbody>
  <tr>
   <td colspan="7">
    <span class="century old">1900</span>
    <span class="century">2000</span>
    <span class="century">2100</span>
    <span class="century">2200</span>
    <span class="century">2300</span>
    <span class="century">2400</span>
    <span class="century">2500</span>
    <span class="century">2600</span>
    <span class="century">2700</span>
    <span class="century">2800</span>
    <span class="century">2900</span>
    <span class="century new">3000</span>
  </td>
</tr>
</tbody>
<tfoot>
  <tr>
   <th colspan="7" class="today" style="display: none;">Today</th>
 </tr>
 <tr>
   <th colspan="7" class="clear" style="display: none;">Clear</th>
 </tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<!-- Datepicker End  -->


            

Callout



Visual Specifications


At Large, Medium, and Small sizes, callouts are used group content together. At the XS screen size the callout is removed to save space; however, there are exceptional instances where a callout is still needed at XS in order to group critical information together. For example, complex forms sometimes require a callout to persist at XS to help the user understand its hierarchy.


Screen size Padding (Top, Right, Bottom, Left) from the edge of the container to the content.
Large 30px, 30px, 30px, 30px
Medium 30px, 30px, 30px, 30px
Small 20px, 20px, 20px, 20px
XSmall 20px, 20px, 20px, 20px *if there is a callout on XS (not default behavior)

Examples


Simple form

L, M, S


XS


Overlay

L, M, S


XS



In primary usage, callout’s background color and padding do not apply at XS size.
In this variation (secondary use), the callout background color and padding persist at all sizes.

                  - xs-void: will omit padding and background color for XS breakpoint.
                  <div class="di-callout {xs-void}">
                  This is test Callout; behave normally for all break points except XS.
                  </div>
 

Input Fields



Input fields allow users to provide textual information to an interface. Typically input fields are labeled within a form and denote whether they are required or optional. Input fields have several possible states to convey validation specifics.

There are two input field sizes: default and small. Default has a 42px text box height. The small size is used for complex forms with space constraints, and has a 35px text box height. The font-size of input within the field is the same for both default and small.



States



Label placement


Preferred label placement is above the field. This accommodates narrow views, and minimizes form completion times. An alternative, when it's necessary to conserve vertical space, is to place right-aligned labels to the left of each field, but this arrangement is more difficult for users to scan than top-aligned labels.

Indicate whether a field is optional or required along with its label. Example: Label (optional).

  • If all fields are required, you may specify that once within the form's instructions to alleviate the need to repeat information within each label.
  • When there are both required and optional fields, identify whichever type is fewer. If there are more required fields than optional fields, annotate only the optional fields (or vice-versa).


Inline error placement


Specific input errors are identified with a red border, an additional outline, and an error message below the field. If there is a need to save vertical space then the error message can display to the right of the field.


Form completion best practices


  • Use the fewest input fields possible to achieve the task
  • Use smart defaults or demonstrative placeholder values
  • When possible, use field length as an affordance (the width of a field helps the user anticipate its purpose).
  • Use forgiving inputs (i.e. the multiple ways people format phone numbers)
  • Use inline validation
  • When possible, validate the field on “blur” when user clicks out of the field

Accessibility


  1. Indicate: Focus; the easiest way to achieve this is to not remove default styling for the outline property.
  2. Identify errors with more than color. Examples: fields in an error state have a thicker visual border in addition to the border being red; error messages use an icon and text color to indicate the error state.
  3. Validation:
    • Error feedback within a form gets the alert role to provide the information immediately to the user. A role of alert is an assertive live region, meaning the message will be delivered to the user immediately.
    • Required elements get the required attribute and aria-required=“true”; items that fail validation get aria-invalid=“true”.
    • When identifying failed validation, consider placing :focus on the item that needs correction.
    • One of the biggest failures with forms is not sending keyboard focus to the field with an error or the list of error messages; when this occurs the user may assume the form is broken. Using the alert role delivers the information immediately to assistive technology, so it’s not necessary to bring :focus to the alert node.


             


              <div class="form-group">
              <label>Default</label>
              <input class="form-control input-xlg" type="text" placeholder="Placeholder text">
              </div>


              <div class="form-group">
              <label>Small</label>
              <input class="form-control input-xsm" type="text" placeholder="Placeholder text">
              </div>


            

States

           

             <div class="form-group">
             <label>Normal</label>
             <input class="form-control input-xlg input-default" type="text" placeholder="Placeholder text">
             </div>


             <div class="form-group">
             <label>Focus</label>
             <input class="form-control input-xlg input-focus" type="text" placeholder="Placeholder text">
             </div>


           

Errors

Error Message

Warning Message

Success Message

Saving

           

            <div class="form-group">
            <input class="form-control input-xlg input-error" type="text" placeholder="Placeholder text">
            <p class="help-block">
            <span class="icon icon-sm-alert-error icon-sm-alert-error-dims" aria-hidden="true"></span>
            Error Message
            </p>
            </div>



            <div class="form-group">
            <input class="form-control input-xlg input-warning" type="text" placeholder="Placeholder text">
            <p class="help-block">
            <span class="icon icon-sm-alert-warning icon-sm-alert-warning-dims" aria-hidden="true"></span>
            Warning Message
            </p>
            </div>


            <div class="form-group">
            <input class="form-control input-xlg input-success" type="text" placeholder="Placeholder text">
            <p class="help-block">
            <span class="icon icon-sm-success icon-sm-success-dims" aria-hidden="true"></span>
            Success Message
            </p>
            </div>



            <div class="form-group">
            <input class="form-control input-xlg input-saving" type="text" placeholder="Placeholder text">
            <p class="help-block">
            <span class="icon icon-sm-small-loader icon-sm-small-loader-dims" aria-hidden="true"></span>
            Saving
            </p>
            </div>




          

Tooltips



Visual Specifications


A tooltip provides the user a brief contextual explanation for a control or feature. Tooltips allow information to be provided optionally, at the time of need.

  • Tooltips are for supplemental information. They do not contain controls for critical actions.
  • Use tooltips sparingly as they can cause usability issues on mobile devices. In the XS screen size, consider making the tooltip a full page.
  • To view a tooltip, the user activates its help icon with a tap or click. To dismiss the tooltip, the user may hit the close corner icon or tap outside the tooltip box.
  • The tooltip can be set to open to the right, below, left, or above the element that activates it.
  • The tooltip’s fill is gray when it overlays a white background, and white when it appears against a gray background.


Example



Accessibility


  1. On close, return focus to the element that activated the tooltip.
  2. The element that activates a tooltip should have a text equivalent. If the text equivalent is hidden from view, it must remain available for assistive technology.
  3. Tool tips: need ARIA role "tooltip" and "aria-hidden" property. The element a tip pertains to needs the ARIA property "aria-describedby".

Default (over white background)

   How do tool tips work?

Variation (over gray background)

   How do tool tips work?


Usage :


            <h4> Default (over white background) </h4>

      <a href="#" class="btn" data-container="body" data-toggle="popover" data-trigger="focus" data-placement="right" data-content="<div class='tip-icon'><h3>Why did I get this page?</h3><span>Common reasons include:</span><ul><li>You recently cleared your cookies <a href='#'>Learn more</a></li><li>You are browsing in private ir incognito mode</li><li>You are using a different browser from the one you set last time</li><li>You knowingly or unknowningly asked to skip this extra security step</li></ul></div>">
          <span class="icon icon-sm-help icon-sm-help-dims"></span>
       </a>



        <h4> Variation (over gray background) </h4>

      <a href="#" class="btn" data-container="body" data-toggle="popover" data-trigger="focus" data-placement="right" data-content="<div class='tip-icon'><h3>Why did I get this page?</h3><span>Common reasons include:</span><ul><li>You recently cleared your cookies <a href='#'>Learn more</a></li><li>You are browsing in private ir incognito mode</li><li>You are using a different browser from the one you set last time</li><li>You knowingly or unknowningly asked to skip this extra security step</li></ul></div>">
           <div class="row tooltip-title"><span class="icon icon-sm-help icon-sm-help-dims icon-gap"></span>   How do tool tips work?</div>
       </a>

            

Tables



Design Guidelines


Tables display grids of information in rows and columns. Their layout and behavior should be tailored to the user's needs for viewing and interacting with the data.

Possible attributes/behaviors of table component

  • sorting results by column
  • searching/filtering of tabular data with input fields or drop downs
  • pagination for large data sets
  • highlight on table rows/cells
  • loading, zero data, warning, and error states
  • errors at the row and cell level

 
 
 
Cards Type Expiry on Owned by Amount  
My Visa Card *0987 Visa 03/14/2015 Jordan Kennsington Smith $12,000.00 Cancel Card
College Card *0987 ATM 12/14/2016 John Smith $9,789.00 Cancel Card
My Debit Card *0893 Debit Card 01/14/2015 Molly Smith $1,258.00 Cancel Card
 

                  <div class="page-header">
                  <h1>Main Heading</h1>
                  <div class="added-info">Additional Information</div>
                  </div>
                  <div class="row">
                  <div class="col-xs-12 table-responsive">
                  <table class="table">
                  <thead>
                  <tr>
                  <th>Cards</th>
                  <th>Type</th>
                  <th>Expiry on</th>
                  <th>Owned by</th>
                  <th class="text-right">Amount</th>
                  <th>&nbsp;</th>
                  </tr>
                  </thead>
                  <tbody>
                  <tr>
                  <td>My Visa Card *0987</td>
                  <td>Visa</td>
                  <td>03/14/2015</td>
                  <td>Jordan Kennsington Smith</td>
                  <td class="text-right">$12,000.00</td>
                  <td><a>Cancel Card</a></td>
                  </tr>
                  <tr>
                  <td>College Card *0987</td>
                  <td>ATM</td>
                  <td>12/14/2016</td>
                  <td>John Smith</td>
                  <td class="text-right">$9,789.00</td>
                  <td><a>Cancel Card</a></td>
                  </tr>
                  <tr>
                  <td>My Debit Card *0893</td>
                  <td>Debit Card</td>
                  <td>01/14/2015</td>
                  <td>Molly Smith</td>
                  <td class="text-right">$1,258.00</td>
                  <td><a>Cancel Card</a></td>
                  </tr>
                  </tbody>
                  </table>
                  </div>
                  </div>
                
 
 
 
 
Cards
Type
Expiry on
 
My Visa Card *0987
Visa
03/14/2015
College Card *0987
ATM
12/14/2016
My Debit Card *0987
Debit Card
01/14/201
 

                  <div class="page-header">
                  <h1>Main Heading</h1>
                  <div class="added-info">Additional Information</div>
                  </div>
                  <div class="row">
                  <div class="col-xs-12">&nbsp;</div>
                  </div>
                  <div class="di-rs-table">
                  <div class="row heading">
                  <!-- Table Heading -->
                  <div class="col-xs-3"><span class="cell first">Cards</span></div>
                  <div class="col-xs-2"><span class="cell">Type</span></div>
                  <div class="col-xs-2"><span class="cell">Expiry on</span></div>
                  <div class="col-xs-3"><span class="cell">Owned by</span></div>
                  <div class="col-xs-2"><span class="cell last">&nbsp;</span></div>
                  </div>
                  <div class="row data">
                  <!-- Table Data Row -->
                  <div class="col-xs-3"><span class="cell first">My Visa Card *0987</span></div>
                  <div class="col-xs-2"><span class="cell">Visa</span></div>
                  <div class="col-xs-2"><span class="cell">03/14/2015</span></div>
                  <div class="col-xs-3"><span class="cell">Jordan Kennsington Smith</span></div>
                  <div class="col-xs-2"><span class="cell last"><a>Cancel Card</a></span></div>
                  </div>
                  <div class="row data">
                  <!-- Table Data Row -->
                  <div class="col-xs-3"><span class="cell first">College Card *0987</span></div>
                  <div class="col-xs-2"><span class="cell">ATM</span></div>
                  <div class="col-xs-2"><span class="cell">12/14/2016</span></div>
                  <div class="col-xs-3"><span class="cell">John Smith</span></div>
                  <div class="col-xs-2"><span class="cell last"><a>Cancel Card</a></span></div>
                  </div>
                  <div class="row data">
                  <!-- Table Data Row -->
                  <div class="col-xs-3"><span class="cell first">My Debit Card *0987</span></div>
                  <div class="col-xs-2"><span class="cell">Debit Card</span></div>
                  <div class="col-xs-2"><span class="cell">01/14/201</span></div>
                  <div class="col-xs-3"><span class="cell">Molly Smith</span></div>
                  <div class="col-xs-2"><span class="cell last"><a>Cancel Card</a></span></div>
                  </div>
                  </div>
                

Tabs



The Tab Container is styled similarly to Primary and Secondary containers, but additionally supports tabbed sections so the user may control which content displays within the container. Tab Container’s content area uses the same values for padding as Primary Container.

Visual Specifications


Small, Medium, Large


XSmall


Screen size Padding for left and right of tabs
Large 30px
Medium 30px
Small 20px
XS 20px

Tab Container


Below is the Tab-Container example. This is another container like Primary and Secondary, but additionally support tab section in it. Each Tab-Container content area follows the same padding rules of Primary Container as specified in XD Spec.. section
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

 


<div id="exTab1" class="tab-container">
  <ul  class="nav nav-pills">
    <li class="active xtab">
    <a  href="#1a" data-toggle="tab">Tab 1</a></li>
    <li class="xtab"><a href="#2a" data-toggle="tab">Tab 2</a></li>
    <li class="xtab"><a href="#3a" data-toggle="tab">Tab 3</a></li>
  </ul>

  <div class="tab-content clearfix">
    <div class="tab-pane active" id="1a">
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    </div>
    <div class="tab-pane" id="2a">
      <p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
    </div>
    <div class="tab-pane" id="3a">
      <p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </div>
  </div>
</div>