Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Add your comments directly to the page. Include links to any relevant research, data, or feedback.

Page Properties
label

Status

Status
colourYellow
titleIn progress

Impact

Status
colourRed
titleHigh
/
Status
colourYellow
titleMedium
/
Status
colourGreen
titleLow

Driver

Sara Greenwood 

Approver

Contributors

Derek Matthew Joseph McLarty Uni (Hwa Young) Oh

Informed

Hannah Stewart (Unlicensed)

Due date

Outcome

Best practice added to: Button Style

Need to create new page under Forms for button location and modals

Background

Button page on Web Design System does not contain any best practice around use of buttons. Adding guidelines will help solidify the standards, both for design and development as well as to help clients understand design decisions.

...

Proposed text is below:

Best Practices

Definitions

  • Primary Action:
    Identifies the Button that the user must click to *continue* or *save* data
    Typically uses the Primary Colour/theme 

  • Destructive Action:
    Identifies the Button that if the User clicked the user entered data would be deleted, reverted to a previous version

  • Secondary Action:
    Identifies any other button that is not Primary or Destructive 
    Typically uses the Default Colour/theme

 Naming

  • Buttons are an action, so always lead with a verb

  • To provide context, buttons should use {verb} + {noun}, example "Find Location"

  • Where context is clear, a single verb may be used, such as within a form, "Next" and "Previous" do not require a noun. Aria-labels may add additional context for screen readers.

  • Button text is written in title case.

Common Names

  • Search

  • Find Location

  • Next / Continue

  • Back / Previous

  • Submit {Noun} 

  • Cancel

Using Primary Button

  • There should only be at most one Primary (btn-primary) action button on a page; the goal is to guide the user to the preferred action.

  • Primary-Cancel should only be used to confirm a destructive action (e.g. in conjunction with the Cancel modal).All other instances of cancel/delete/remove should use the regular Cancel (btn-cancel).

Location

Modal Windows
When used within a single step form

The submit action ("Submit") should be to the left.

  • Located at the end of a form input

  • btn-lg (use large sized buttons)

e.g. Final Form Navigation Actions (submit/save/update)

Left Aligned: <button primary>Submit<primary>Submit {{FormName}}</button>

When used within a mulistep form

The forward action ("Next", "Submit") should be to the right of the backwards action ("Previous", "Cancel")

  • Located at the end of a form input

  • btn-lg (use large sized buttons)

e.g. Form Navigation (previous/cancel, next/continue/submit)

...

Right Aligned:<button primary>Next / Submit {{FormName}}</button>

When used with an input (Inputs + Buttons)

When a button is needed to submit a form and there is only one input field then the input field and button must be connected

If there are multiple input fields then the button and the input field must be disconnected (not touch)

  • Buttons are used for actions "Submit", "Next", "Previous", "Cancel", "Find"

  • Links are used for navigation and usually appear within or following a sentence.

...

  • Icons within buttons should be used sparinglyavoided

  • When icons are used, it should be combined with the button name and icons should be to the left of the name.

  • Icons should very rarely be on their own; an exception is where space is limited and an icon is recognizable in it’s function. Screen reader only text (or an Aria-Label) must be applied.

Common Names

Generally Buttons should follow the `Action + Noun` format. Unless the context (noun) can easily be understood by other features such as labels, page titles, text descriptions

  • Search

  • Find Location

  • Next / Continue

  • Back / Previous

  • Submit {Noun} 

Accessibility

Options considered

Option 1:

Option 2:

Description

Pros and cons

(plus)

(minus)

(plus)

(minus)

Estimated cost

Status
colourRed
titleLarge

Status
colourYellow
titleMedium

Action items

  •  

Outcome