Skip to content

Instantly share code, notes, and snippets.

@JasonNeel
Last active January 5, 2016 22:31
Show Gist options
  • Save JasonNeel/5366602cf79633b4a636 to your computer and use it in GitHub Desktop.
Save JasonNeel/5366602cf79633b4a636 to your computer and use it in GitHub Desktop.
Testing Your Designs at Various Font Sizes—For a11yproject.com
# Testing Your Designs at Various Font Sizes
## Why Test?
Reasons for users bumping up the base font size or zoom level in their browsers aren’t just limited to those with vision impairments (although that should be reason enough for you to test your designs anyway). Certain browsing situations may necessitate inceasing the font size of your site’s text, such as displaying the site using a lower-resolution projector or when screen contrast is not high enough.
## Adjusting Your Browser’s Font Size
Testing your website design for when a user may have set their browser's zoom or base font size to something larger is fairly simple thing to do. Most browsers have a simple set of keyboard shortcuts for this purpose:
* <kbd>Command</kbd>+<kbd>+</kbd> for Macs or <kbd>Ctrl</kbd>+<kbd>+</kbd> for PCs will increase font size
* <kbd>Command</kbd>+<kbd>-</kbd> for Macs or <kbd>Ctrl</kbd>+<kbd>-</kbd> for PCs will decrease font size
* <kbd>Command</kbd>+<kbd>0</kbd> for Macs or <kbd>Ctrl</kbd>+<kbd></kbd> for PCs will reset the font size back to the default size (typically 16px)
Additionally, these commands are usually found within the “View” menu of browsers.
Be sure to test in as many browsers as possible and not just your browser of choice.
## What To Look For
Make sure text remains legible at the various zoom levels. Key user interface elements (like navigation dropdowns) should still be usable with mouse and/or keyboard.
Try to keep blocks of longform text at a comfortable measure (the number of characters per line). A measure of 45–75 characters is ideal. This helps readability, especially for those with visual and cognative impairments.
Avoid using important text within graphics. If you do use text within graphics, check to make sure the text is still readable when zoomed far in or out. Also, make sure alternative text can be found via non-visual methods, like an `alt` attribute on an inline `<img>`.
## Further Reading
For additional tips on testing your designs by resizing the text, be sure to see the [AA WCAG 2.0 Guideline on Resizing Text](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-scale.html).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment