CarrierLogo

Accessibility

Accessibility props

NameTypeDescription
ariaHiddenbooleanWhen set to true, hides the CarrierLogo from screen readers. Use when the carrier name is displayed nearby.
NameTypeDescription
namestringRequired. Used as the alt and title attributes for the carrier image for screen reader users.

Automatic accessibility features

  • Each carrier logo image automatically receives alt and title attributes with the carrier’s name (the name property in each carrier object), ensuring screen readers can announce the carrier.

Best practices

Examples

Without text

<CarrierLogo
carriers={[
{
code: "OK",
type: "airline",
name: "Czech Airlines", // This name becomes the alt and title text
},
]}
/>

With visible text

<Stack direction="row" spacing="100" align="center">
<CarrierLogo
ariaHidden
carriers={[
{
code: "OK",
type: "airline",
name: "Czech Airlines",
},
]}
/>
<Text>Czech Airlines</Text>
</Stack>

Multiple carriers

<Stack spacing="medium">
<Stack direction="row" spacing="none">
<CarrierLogo
inlineStacked
carriers={[
{ code: "FR", name: "Ryanair" },
{ code: "TO", name: "Transavia France" },
]}
ariaHidden
/>
<Stack direction="column">
<Text>Ryanair</Text>
<Text>Transavia France</Text>
</Stack>
</Stack>
</Stack>