Screen size and magnification
It’s important to test your site using the developer tools on different devices, to make sure it behaves properly at different scales and proportions. We already do this as part of responsive design and development, but WCAG sets very specific thresholds for accessibility purposes.
You should:
- Use developer tools to view on different screen sizes.
- Use browser zoom to view at different magnifications on different screen sizes. The site should have no loss of content or functionality at least at 200% zoom, ideally up to 400% zoom.
- Ensure that users viewing the site at a high magnification don’t have to scroll in two directions (unless absolutely necessary). That means:
- For vertical scrolling (most situations): ensure no loss of content or functionality (without requiring horizontal scroll) at a width equivalent to 320 CSS pixels. For example:
- Width of 320 pixels at 100% zoom.
- Width of 1280 pixels at 400% zoom.
- For horizontal scrolling (rare): similar as above, but at a height equivalent to 256 CSS pixels.
- For vertical scrolling (most situations): ensure no loss of content or functionality (without requiring horizontal scroll) at a width equivalent to 320 CSS pixels. For example:
Typography
You need to make sure that default typography sizes and spacing can be overridden by the user without loss of content or functionality. You can use developer tools to try the CSS code below and check if your site displays properly with an increased base font size and the minimum spacing required:
* {
line-height: 1.5em !important;
letter-spacing: 0.12em !important;
word-spacing: 0.16em !important;
}
:root {
font-size: 25px !important;
}
p {
margin-top: 2em !important;
margin-bottom: 2em !important;
}
Resources
Chrome:
- How to Test Responsive Design in Device Mode with Chrome Developer Tools by Kayce Basques (2019)
- The Chrome DevTools Sources Panel: Overrides vs FileSystem vs Snippets vs Page by Christian Nwamba (2019)
- Create New Stylesheets in Chrome Dev Tools by Umar Hamza (2016)
Firefox:
- Responsive Design Mode on MDN web docs
- How to Add a User Stylesheet in Firefox by David Walsh (2018)
Safari:
- How to Activate and Use Responsive Design Mode in Safari 9 by Scott Orgera (2020)
- Safari for OS X – Using your own style sheets on AbilityNet
Edge:
- Simulate Mobile Devices with Device Mode in Microsoft Edge DevTools on Microsoft Docs
- Get Started With Viewing And Changing CSS on Microsoft Docs
Other:
- What Does Responsive Web Design Have to do with Accessibility? by Jonathan Avila (2013)
- Success criterion 1.3.4: Orientation [Level AA] on WCAG 2.1
- Success criterion 1.4.4: Resize text [Level AA] on WCAG 2.1
- Success criterion 1.4.8: Visual Presentation [Level AAA] on WCAG 2.1
- Success criterion 1.4.10: Reflow [Level AA] on WCAG 2.1
- Success criterion 1.4.12: Text Spacing [Level AA] on WCAG 2.1