Working with buttons

Buttons are specialized links that come in several style variations:

StyleAppearanceNotes
DefaultDefault button style 
PrimaryPrimary button styleUCI brand blue
SecondarySecondary button styleUCI brand gold

Success

Success button style 
InfoInfo button style 
WarningWarning button style 
DangerDanger button style 
LinkLink button styleMargin and padding of a button without the background or border

Defining images in the templates

The following datadef form elements are are reused in many places in the 2015 templates when buttons are to be included in the page content:

Datadef elementDescription
... > LinkRefer to 'Working with links'.
... > Style

How the button is styled. Refer to above table.

... > TextOnly appears if the link associated with the button has 'Auto generate link text' set to 'no'.
... > Text > Hidden beforeHidden text inserted before the displayed button text.
... > Text > DisplayedText displayed in the button.
... > Text > Hidden afterHidden text inserted after the displayed button text.
... > Set internationalizationRefer to 'Internationalization'.

Making button links accessible

Commonly, the text displayed in a button is terse and is only given meaning by the surrounding content. For example, a button link displaying the text 'More', does not convey any information about the link destination on it's own. To provide additional meaning to button links, use the 'Hidden before' and 'Hidden after' datadef elements. The value of these elements is used in conjunction with the value of 'Displayed' to form a more informative link phrase that make sense when the link is examined out of context.

Accessible button examples

Datdef valuesLink text displayed on screenLink text spoken by screen readers
  • Hidden before: (empty)
  • Displayed: 'Learn'
  • Hidden after: 'more about visiting our campus.'
'Learn''Learn more about visiting our campus.'
  • Hidden before: 'UCI campus'
  • Displayed: 'Calendar'
  • Hidden after: (empty)
'Calendar''UCI campus calendar'