Goals for future websites or web applications builts in the next year include:
- Accessibility: content on the web application should be accessible to people of different abilities using screenreaders by default
- Footprint: assets and markup of web application should be as minimal as possible without forgoing any of these other goals
- Mobile-first: design layouts and content dissemination should be optimized for mobile-first
- Usable: most common tablet and desktop size renderings should work well
- Performance: ensure each page load has first meaningful paint within 0.4s and ensure page fully interactive by 0.8s (without network latency)
Decisions to accomplish the goal:
- utilize ARIA attributes: https://www.w3.org/TR/html-aria/
- utilize semantic HTML5 elements wherever relevant and possible to convey message of content. These include `article`,`aside`, `details`, `figcaption`, `figure`, `footer, `header`, `main`, `mark`, `nav`, `section`, `summary`, `time`, `abbr`, `acronym`, `blockquote`, `ul`, `ol`, `h1`, … `p`, `code`, `dfn`, `cite`, `hr`, `kbd`, `samp`, `sub`, `sup`, `var`, `strong`, etc.
Decisions to accomplish the goal:
- avoid general purpose CSS frameworks
- use minimimalist reset CSS
- style for conveying the content as intended, do not be concerned with visual design until much later in the development cycle
Decisions to accomplish the goal:
- use CSS Grid to layout elements (simpler for my brain to grok) https://developer.mozilla.org/en-US/docs/Web/CSS/grid
- optimize for smaller phone width is default layout without media queries styles
- TODO determine if we want to go the responsive or adaptive layout route in terms of behavior as width increases.
Decisions to accomplish the goal:
- use media queries to layout content elements for larger phones, tablets and desktops based on width
Decisions to accomplish the goal:
- utilize minimizers, compressors, dead code eliminators, or optimizers as appropriate for each type of asset, e.g. CSS, Javascript, HTML, PNGs, etc. (investigate parcel)
- avoid unnecessary Javascript includes
- ensure Javascript includes can be loaded asynchronously or deferred and advice in markup as expected wherever possible
- leverage Cache-Control and related HTTP headers and CDN hosting when possible
- host using the HTTP/2 (over TLS) protocol
- use common sense (but validated) performance optimization approaches for Javascript and CSS
- render HTML in minified form
- leverage preconnect/prefetch rel attribute values for CSS
- avoid custom fonts like the plague
- leverage lighthouse for feedback and just feedback judiciously
- eliminate or eradicate third party tracking includes except up to one of them. Investigate their data collection and privacy policy for my users.