When building components, you should check that the text:
- resizes with the page and does not stay a fixed size
- stays within its containers (for example, a box or banner)
If text spills outside of its container, your component:
- will look wrong
- may not work, if the text blocks out an interactive element
- may make some text hard for users to read
Follow these instructions to test the effect of resizing text within different browsers and devices. Please note some browsers may work slightly differently, depending on their version.
You can resize text in Firefox in 2 ways.
- On the menu bar, select Firefox.
- Select Preferences.
- Under Language and appearance - Zoom, select Zoom text only. This option lets you zoom in or out only on the webpage text. It does not affect images or any other page elements.
- Press Command (Mac) or Ctrl (other operating systems), then + or - to increase or decrease the text size.
- On the menu bar, select Firefox.
- Select Preferences.
- Under Language and appearance - Fonts and Colors, select the Size dropdown to display font size options.
- On the URL bar, select the 3 dots icon.
- Select Settings.
- Select Appearance.
- Select Customise fonts. The screen displays the options for you to change the font size.
- Select Settings.
- Select Accessibility.
- Drag the Text scaling slider until you're happy with the size of the example text.
- Press Alt to display the menu bar.
- On the menu bar, select View.
- Select Text size to display resizing options.
- On the URL bar, select the 3 dots icon.
- Select Settings.
- Select Appearance.
- Scroll down to Fonts and select the Font size dropdown to display font size options.
- Press Option.
- While still pressing Option, select the View menu.
- Select Make Text Bigger or Make Text Smaller. To display the text in its original size again, select Actual Size.
You cannot resize the text for GOV.UK Design System styles in iOS.
Due to iOS constraints, our styles do not support adjusting the base font size on iOS devices.
For more details, see our GitHub issue #882: Investigate Dynamic Type to improve accessibility for iOS users.