Medium impact 🌿

Apply tree shaking to code

Often when coding, projects can accumulate clutter and functions which are no longer used (due to newer, more effective features being developed). By utilizing tree shaking techniques, all the "dead wood" will be automatically dropped upon compilation, reducing a file's size.

Actions checklist
  • Remove Redundancy

    Identify and eliminate unused and dead code within CSS and JavaScript.

☞ See on W3C

🦾🦾

High impact 🌿

Ensure your solutions are accessible

Not everyone can access services equally, being sustainable is also about being accessible, fair, ethical, and ensuring that your product or service doesn't discriminate. As such, ensuring your website complies with best-practices and relevant laws whilst meeting the needs of your visitors is critical as well as good business.

Actions checklist
  • Accessibility Compliance

    Your website or application must conform to WCAG (at the necessary level), plus extend beyond to obey relevant laws and meet additional visitor accessibility requirements. Building inclusively means that people with permanent, temporary or situational disabilities will be able to more quickly find what they are looking for, and not have to spend extra time searching for a way to use your product or service.

  • Enhancing For Accessibility

    Enhance your website or application with Accessible Rich Internet Applications (ARIA) ONLY if applicable or necessary, and accessibility enhancing features when useful or beneficial.

  • Electronic Inequalities

    Deploy solutions which fight against electronic inequalities in products and services.

☞ See on W3C

🦾🦾

Medium impact 🌿

Avoid code duplication

Redundancy is the enemy of sustainability. Having systems in place to ensure that everyone can work from established patterns, the website or application remains clean and easy to use, and iteration over redesign is firmly in the mindset that will help promote sustainable practices. It's also worth being wary of abstracting code too early (see AHA methodology) or incorrectly, as while good abstractions can be more efficient, poor ones can waste effort and introduce complexity, bloat, and bugs to your codebase which can lead to emissions.

Actions checklist
  • Remove Or Simplify

    Don't be afraid to remove or simplify (through rewriting for performance) your code to focus on essential features and have a cleaner, less redundant product (and codebase).

  • Iteration Over Recreation

    Improve (iterate) an existing creation rather than constantly redeveloping and redesigning products from scratch (duplication of coding effort) if possible to reduce visitor learning burden and developer impact.

  • Organize Code Arrangement

    Within CSS and JavaScript, use methodologies (like BEM) and systems like DRY and WET to optimize the arrangement and output of your source code.

☞ See on W3C

🦾🦾

High impact 🌿

Rigorously assess third party services

Whether advertising, chatbots, maps, or other tooling; outsourcing your service to a third-party provider may be potentially useful in certain scenarios in reducing design or development time and redundancy (which can be a win for sustainability). Third-party services, however, come with issues, such as the lack of control over emissions, and they often can potentially suffer from latency and large file sizes which may not exist if you self-hosted or created the material.

Actions checklist
  • Assess Third-Parties

    Assess third-party services (including plugins, widgets, feeds, maps, carousels, etc) as early in the ideation or creation process as possible and use as few as possible to reduce the product or service's overall ecological impact, including Scope 3 emissions.

  • Third-party Implementation

    Third-party content (including plugins, widgets, feeds, maps, carousels, etc) should be placed behind a click-to-load delay screen (using the "import on interaction" pattern), while alternatives to automated solutions such as chatbots should be offered.

  • Libraries And Frameworks

    Large CSS libraries and JavaScript frameworks should only be used if a more performant alternative which achieves the same goal cannot be used instead.

  • Self-Hosting

    Prioritize self-hosted content over embedded content from third-party services.

  • Avoiding Dependency

    Create your own clickable icons and widgets, rather than relying on third-party services to host or allow embedding within your product or service.

☞ See on W3C

🦾🦾

Medium impact 🌿

Use html elements correctly

HTML semantics are important. They don't just play a key role in making the Web look the way it does, they have a function in accessibility, in SEO, and even in sustainability. Ensuring that you markup your content correctly and avoid cluttering your markup wastefully will reduce emissions.

Actions checklist
  • Semantic Code

    Ensure content is marked up semantically using the right HTML element for the right job.

  • Optional Features

    Consider removing optional HTML tags (which aren't required for rendering), attribute quotes, or attributes that are set to their default value.

  • Avoid Non-standard Code

    Avoid using non-standard elements or attributes.

  • Custom Code

    Only use custom elements or Web Components if you cannot utilize native HTML elements or if you need tightly regulated control over the implementation of design system components.

☞ See on W3C

🦾🦾

Medium impact 🌿

Resolve render blocking content

The ability to work around render-blocking issues is a great addition to the web. From deferring code, to lazy loading, to asynchronous loading, each has its own use-case and each can have the potential to reduce or give performance benefits to a website or application.

Actions checklist
  • Asynchronous Code

    All external assets should be deferred or set to async (unless required) to avoid FOUC (Flash Of Unstyled Content).

  • Priority Loading

    If external resources are required on load, ensure their priorities (delivery route) are set correctly.

☞ See on W3C

🦾

Low impact 🌿

Provide code based way finding mechanisms

Helping visitors avoid wasting their time can reduce the number of emissions from time spent in front of a screen. As such, by using existing technologies like metadata, robots files, and accessibility-friendly aids within the page, improvements to the experience can be made.

Actions checklist
  • Metadata And Microdata

    Optimize your metadata and microdata for search engines and social media.

  • Search Engines

    Assist search engines, while blocking any ill-intentioned robots and scripts.

  • Accessibility Aids

    Offer accessibility and usability aids to find content, such as skip links and signposts.

☞ See on W3C

🦾

Medium impact 🌿

Validate form errors and external input

Entering information on a page can lead to problems. If a visitor makes a mistake along the way, it makes good sense to have systems in place to guide them through resolving the typos, confusion, and glitches that can occur which lead to abandonment and extra emissions through wasted device usage.

Actions checklist
  • Error Validation

    Errors should be identified through live validation as well as upon submission.

  • Label Elements

    Required elements should be clearly identified and labeled (for the benefit of voice tools such as screen readers and virtual assistants), and optional elements (if unnecessary) removed.

  • Allow Paste

    Always allow the pasting of content (including passwords) from external sources.

☞ See on W3C

🦾