Accessibility
Labels, reduced motion and sound that waits for you.
Labels
An icon next to a visible label is decoration, so it is hidden from screen readers (aria-hidden). When an icon is the only thing in a button, label it with title. It then becomes an image with that name:
<button><Mail /> Messages</button> {/* label from the text */}
<button aria-label="Messages"><Mail /></button> {/* or label the button */}
<a href="/inbox"><Bell title="Inbox" /></a> {/* or label the icon */}Reduced motion
When someone asks their system for reduced motion, icons stay still. Nothing else changes: they still render, and they still play their sound if you turned sound on.
Keyboard
With animate="hover", an icon also plays when its button or link gets keyboard focus. Mouse clicks do not count as keyboard focus.
Sound
Sound is off unless you turn it on. Browsers only allow it after the visitor has clicked, tapped or pressed a key on the page. Until then icons are silent, and they never play a delayed burst later. Keep sound for direct actions, such as pressing a button, and give people a way to mute it. setVolume(0) from jiggicons mutes every icon.
Colour
Icons use your text colour, so they meet the same contrast as your text. Duotone fills sit at 20% under a full-strength outline.