Skip to content

Web App Checklist: Frontend

A concise guide to frontend performance, accessibility, i18n, and SEO.

Performance

Measuring Performance

The currently popular metrics are:

  • First Contentful Paint (FCP) - time took to render the first image or text on the initial viewport
  • Largest Contentful Paint (LCP) - time took to render the largest image or text on the initial viewport
  • Cumulative Layout Shift (CLS) - how much things moved around while the page loads
  • Interaction to Next Paint (INP) - time took to render some feedback after user interaction

Some less popular metrics:

  • First Paint (FP) - time took to render the first pixel to screen
  • First Input Delay (FID) - time took from user's first interaction to render any UI feedback

Use Lighthouse and Performance to inspect page load performance on any website.

Use the Performance APIs to collect performance in production.

Improving Performance

Use a CDN, enable caching

For loading any resources, use Resource Hints:

For images:

  • Specify height and width to prevent layout shifts
  • Use the webp image format
  • lazy load them
  • Consider using the <picture> element to load different images base on screen size

For JavaScripts:

  • Mark scripts as async or defer
  • Inspect bundle sizes: ESBuild, Webpack, Vite
  • Remove dependencies that are not actually used
  • Reduce bundle size by minifying and tree-shaking
  • Split bundles and only serve the ones the page need: ESBuild, Webpack, Vite

For CSS:

  • Minify and compress the CSS
  • Rely on inheritance instead of universal selectors (i.e. body *). This also makes overriding style easier

For Fonts:

  • Instead of linking from a font CDN (i.e. google fonts), consider downloading it and serving it from your own infra (i.e. your own CDN). This ensures you always load the same font, and reduces unnecessary DNS time
  • Only load the glyphs that are actually used. This can be particularly consequential for CJK characters

For animations:

Additional considerations:

  • the speed on the "first load with empty cache" might be significantly different from subsequent visits/navigations
  • the speed on mobile might be significantly different from desktop due to reduced internet speed and processing power
  • consider using server side rendering

Accessibility (a11y)

Usability predicates accessibility - if the user experience doesn't work well for the average user, it’s unlikely to work well for those with accessibility needs. So:

  1. Just have a good functioning website, that includes

Now comes to addressing accessible needs, ordered by increasing complexity.

  1. Speech - provide ability to type for voice features. For example: Type to Siri, TTY.
  2. Auditory - provide subtitles and visual cues. For example: subtitled tiktoks
  3. Cognitive & neurological

And to address additional visual and physical accessibility needs, the page should be:

  1. Keyboard accessible - all element must satisfy all or none of the following

    • is mouse clickable - has onclick handler
    • is keyboard focusable - has onkeydown handler, add tabindex=0 if needed
    • is visually different when is focused - has :focus or :focus-visible style
    • has interactive semantics - prefer <button> over <div>; or adding role="button" when constrained
  2. Screen reader friendly

Internationalization/Localization (i18n/l10n)

Localization vs Internationalization

Localization: adapting software to a specific culture Internationalization: designing software so that it can be easily localized

Get user's preferred language via navigator.language and a list of all accepted language via navigator.languages. And backend can use the Accept-Language header.

The global object Intl provides many functions for generating localized text.

There are many more things to localize that browsers don't yet have support for.

Furthermore, webpage should handle different text direction, or ideally, design for bidirectionality (RTL layout) (Material v3 version).

Search Engine Optimization (SEO)

Be crawlable

Additionally:

Many points from the a11y section still apply here.

And also from the performance section:

  • Each page should load fast (low FCP, LCP)
  • Make sure it load fast on mobile too

Be shareable

Created on 2025-07-13

Last updated on 2025-07-13