Iconography
Icons are applied throughout the website and give an indication of what is required or executed when an element is used.
Icon guidelines
Creating an icon
- It should be obvious to the user what the icon is representing.
- Use Font Awesome where possible for a consistent look.
- Convert the font to an SVG using an image editor.
- Optimise the SVG to reduce the file size further using an SVG optimiser.
- Make sure the icon has sufficient contrast with its background of 4.5:1 for AA conformance levels at the time of saving.
Making icons accessible
- If the images are turned off or do not load there needs to be an ‘alt’ text attribute describing the missing image.
- A ‘title’ attribute is needed to show tooltip description when rolling over the icon.
- When an icon is used as a button, the user must be able to tab to the button. A particularly important case is when the button is inside a table and images have been turned off.
- The ‘sr-only’ attribute hides an element to all devices except screen reader.
- The 'sr-only-focusable' attribute shows the element again when it is focused (eg by a keyboard-only user)
Code example
<a class="sr-only sr-only-focusable" href="#">Skip to main content</a>
- Use the 'aria-labelledby' attribute as it is good for extra information.
Code example
<button type="submit" class="c-header__search__submit" title="Search" aria-labelledby="js-mobile-search-label"></button>
Icon classes
Icons are composed of a number of classes in order to make them appear.
Base class
The base class, c-icon
, is compulsory and must be used to make the icon appear correctly.
Position class
This class is optional and controls the icon position. The default is center and the options are:
- left
c-icon--left
- right
c-icon--right
- top left
c-icon--top--left
Size class
This class is optional and controls the icon size. The default is 1 rem and the options are:
- extra small
c-icon--xsmall
.5 rem - small
c-icon--small
.75 rem - medium
c-icon--medium
1.5 rem - large
c-icon--large
2 rem - extra large
c-icon--xlarge
3 rem
Icon type class
This class is the name of the icon you wish to choose. These are described below.
Icon types
Right blue arrow
Right white arrow
Right grey arrow
Left purple arrow
Left blue arrow
Left white arrow
Left grey arrow
Left purple arrow
Down blue arrow
Down white arrow
Up white arrow
Up down arrow
Question mark blue
Reset white
Reset blue
Exclamation mark
Search white
Search purple
Blue cross
purple cross
green cross
orange cross
red cross
white cross
dark cross
Green tick
White tick
Purple loading
White loading
award blue
bank
download
globe
page
teacher
upload
users
email white
info
phone blue
phone grey
phone purple
menu purple
menu blue
clock
file grey
question circle grey
Excel
MP3
powerpoint
exe
word
zip grey
web page
login
play blue
play grey
play white
link blue
link grey
link white
external link blue
twitter blue
twitter white
twitter grey
facebook white
whatsapp white
spotify white
google podcasts
apple podcasts
purple star
filter ( blue, grey & purple)
sort by ( blue, grey & purple)
pointer left (purple, blue & grey )
pointer right (purple, blue & grey )
write blue
develop blue
scan blue
pen purple
pen and paper purple
wallet purple
meeting purple
bell blue
video teal
textbook turquoise
smiley purple
head open book purple
running figure purple
graduate purple
c-icon__plus-square--blue
c-icon__bin--blue
Examples
For more examples see:
Blue right arrow
Example
Code example
c-form__input c-icon c-icon--right c-icon--large c-icon__right-arrow--blue
Search
Example
Code example
c-form__input c-icon c-icon--right c-icon--large c-icon__search--purple
Green tick
Example
Code example
c-icon c-icon--right c-icon--large c-icon__tick--green