Bootstrap Icons - UI & Accessibility Patterns

Real-world UI patterns demonstrating icon integration with Bootstrap components and proper accessibility techniques.

Buttons with Icons

Combine icons with buttons for visual clarity. Use spacing utilities (.me-1, .ms-1) between icons and text.

Icon Before Text

Icon After Text

View all

Icon-Only Buttons

Icon-only buttons must have aria-label for screen readers. Icons use aria-hidden="true" to avoid redundant announcements.

Navigation with Icons

Icons enhance navigation by providing visual cues. Keep icons decorative when text is present.

Nav Pills with Icons

Sidebar Navigation

Breadcrumb with Home Icon

Lists with Icons

Use icons as visual markers in lists. Icons should be decorative when the list item text conveys meaning.

Feature List with Checkmarks

  • Unlimited storage space
  • 24/7 customer support
  • Free SSL certificate
  • Automatic backups

Status List (Included/Excluded)

  • Basic features included
  • Email support included
  • Priority support not included
  • API access not included

Contact Information List

  • 123 Main Street, City, Country 12345
  • +1 (555) 123-4567
  • contact@example.com
  • Mon-Fri: 9:00 AM - 5:00 PM

Social Icons

Social icon links require accessible names since they contain no visible text. Use aria-label on the link element.

Horizontal Social Bar

Footer Social Pattern

Icon Badges

Position badges on icons for notifications and counts. Include visually-hidden text for screen readers.

Notification Badges

Status Indicator Badges

Online Away Busy Offline

Accessibility Patterns

Proper accessibility ensures icons are announced correctly by screen readers. The approach depends on whether the icon conveys meaning or is decorative.

Meaningful Icons (Convey Information)

When icons convey meaning not available in text, provide accessible text.

Option 1: visually-hidden text
Option 2: aria-label on parent element
Option 3: title + role="img" (shows tooltip)

Decorative Icons (Hide from Screen Readers)

Icons that don't add meaning should be hidden with aria-hidden="true".

← Icon is decorative; "Download Report" conveys the action

Icon with Visible Text

When visible text describes the action, hide the icon from screen readers to avoid redundant announcements.