Airframe GitHub Storybook
Component

ba-flight-number

A simple component to show a customers flight number and the logo of the airline they are flying with.

Airframe

Active
Figma

Web Components

Active
Storybook GitHub

React

Planned

React Native

Planned
Design Code Accessibility QA
A

Airline icon

The logo of the airline operating the flight. A fallback icon is shown if no name is provided, the name has no matching icon, or the image fails to load

B

Flight number

The flight number text, e.g. "BA 1234"

We currently only have icons that work correctly with white backgrounds. Do not use the other page-segment themes as the colour contrast ratio will not meet the WCAG standards.

If ba-flight-number is used within ba-content the typography settings and size of the icon will be determined by the element it is nested in. For example if the component is nested within a <h1> tag, then it will use the same typography settings as the <h1> element.

<ba-flight-number name="british-airways" flight-number="BA 1234"></ba-flight-number>
Property Attribute Description Type Default
flightNumber(required) flight-number The flight number to show string undefined
name name Name of the icon to be shown CarrierName | undefined 'default'
  • None
Slot Description Permitted elements
Unnamed slot Elements will render in the body of the component <Plain text>

ba-flight-number can be slotted into:

In most scenarios the flight number will consist of a flight number and an icon

Basic usage of ba-flight-number
<ba-flight-number name="british-airways" flight-number="BA 1234"></ba-flight-number>

If the airline does not have an icon available, simply do not provide the name prop to show a fallback icon

Using the fallback icon
<ba-flight-number flight-number="BA 1234"></ba-flight-number>

If a name is provided that does not have a corresponding icon, or the image fails to load, the fallback icon will be shown

Unknown icon
<ba-flight-number name="unknown-icon" flight-number="BA 1234"></ba-flight-number>

The font size of the flight number can be adjusted by using the ba-content component to wrap the ba-flight-number component. The typography settings and size of the icon will be determined by the element it is nested in. For example, if the component is nested within a <h1> tag, then it will use the same typography settings as the <h1> element.

Changing the font size of ba-flight-number
<ba-content>
  <h1>
    <ba-flight-number name="british-airways" flight-number="BA 1234"></ba-flight-number> used within a heading tag.
  </h1>
</ba-content>

React documentation coming soon.

React Native documentation coming soon.

Screen readers may read out the flight number incorrectly. For example a flight number of BA 1234 may be read out as "Ba one thousand two hundred and thirty four". This is by design as altering the text to be read out correctly for screen readers can hamper the accessibility of the component when trying to navigate through it. Also screen reader users are used to this kind of behaviour and can easily navigate through the text one character at a time if needed.

No keyboard interactions have been defined for this component.

Use this checklist to confirm the component has been configured and used correctly.

  • ba-flight-number is only used on a white background, not on other page-segment themes
  • If used within ba-content, the typography and icon size are determined by the element it is nested in
  • The flight number text is displayed as is and additional fixes to modify how it is read by screen readers are not applied

These checks are handled by the component and do not need to be repeated each time it is used.

  • The fallback icon is shown when no name is provided, an unrecognised name is provided, or the image fails to load
  • Colour contrast for the icon and text meets WCAG standards on a white background
  • High contrast mode adjustments
Designing Developing Components BAgel helper QA process britishairways.com Careers Cookie policy