ServiceLogo

Accessibility

Accessibility Props

NameTypeDescription
altstringSpecifies the alternative text for the image to provide context about the service logo component for screen readers.

Automatic Accessibility Features

  • The component automatically manages ARIA attributes:
    • When alt is not provided, default role of "presentation" is set. This makes the logo decorative and hidden from screen readers.
    • When alt is provided, the role is set to "img" and the logo becomes accessible to assistive technologies.
  • Grayscale mode applies visual styling without affecting accessibility (except for the color contrast)

Best Practices

  • If descriptive text should be provided, fill in the alt prop. Role of the ServiceLogo component is automatically set to "img", otherwise it is set to "presentation" by default.
  • For payment logos, include the payment method name in the alt text (e.g., “Visa”, “PayPal”, “American Express”).
  • For service logos, include the service name and context if relevant (e.g., “Kiwi.com guarantee”, “AirHelp assistance”).
  • The alt text should always be translated to the user’s language.
  • Avoid redundant alt text when the logo appears next to visible text containing the same information.
  • Ensure sufficient color contrast when using grayScale mode, especially against non-white backgrounds.

Examples

Decorative logo alongside text

<Stack>
<ServiceLogo name="Visa" />
<Text>Pay with Visa</Text>
</Stack>

Semantic logo with descriptive text

<ServiceLogo name="PayPal" role="img" alt="PayPal payment method" />

Multiple payment methods (decorative)

<Stack>
<ServiceLogo name="Visa" />
<ServiceLogo name="MasterCard" />
<ServiceLogo name="Amex" />
<Text>Visa, MasterCard, and American Express accepted</Text>
</Stack>