# Front-End-Checklist **Repository Path**: kangxiok/Front-End-Checklist ## Basic Information - **Project Name**: Front-End-Checklist - **Description**: The perfect Front-End Checklist for modern websites and meticulous developers - **Primary Language**: Unknown - **License**: CC0-1.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-12-12 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Front-End Checklist [![Contributors](https://img.shields.io/github/contributors/thedaviddias/Front-End-Checklist.svg)](https://github.com/thedaviddias/Front-End-Checklist/graphs/contributors) [![CC0](https://img.shields.io/badge/license-CC0-green.svg)](https://creativecommons.org/publicdomain/zero/1.0/) The **Front-End Checklist** is an exhaustive list of all elements you need to have / to test before launching your site / page HTML to production. It is based on Front-End developers' years of experience, with the addition from some other open-source checklists. ## Table of Contents 1. **[How to use](#how-to-use)** 2. **[Head](#head)** 3. **[HTML](#html)** 4. **[Webfonts](#webfonts)** 5. **[CSS](#css)** 6. **[Images](#images)** 7. **[JavaScript](#javascript)** 8. **[Security](#security)** 9. **[Performance](#performance)** 10. **[Accessibility](#accessibility)** 11. **[SEO](#seo)** ## How to use? All items in the **Front-End Checklist** are required for the majority of the projects, but some elements can be omitted or are not essential (in the case of an administration web app, you may not need RSS feed for example). We choose to use 3 levels of flexibility: * ![Low][low_img] means that the item is **recommended** but can be omitted in some particular situations. * ![Medium][medium_img] means that the item is **highly recommended** and can eventually be omitted in some really particular cases. Some elements, if omitted, can have bad repercussions in terms of performance or SEO. * ![High][high_img] means that the item **can't be omitted** by any reason. You may cause a dysfunction in your page or have accessibility or SEO issues. The testing priority needs to be on these elements first. Some resources possess an emoticon to help you understand which type of content / help you may find on the checklist: * πŸ“–: documentation or article * πŸ› : online tool / testing tool * πŸ“Ή: media or video content --- ## Head > **Notes:** You can find [a list of everything](https://github.com/joshbuchea/HEAD) that could be found in the `` of an HTML document. ### Meta tag * [ ] **Doctype:** ![High][high_img] The Doctype is HTML5 and is at the top of all your HTML pages. ```html ``` > πŸ“– [Determining the character encoding - HTML5 W3C](https://www.w3.org/TR/html5/syntax.html#determining-the-character-encoding) *The next 3 meta tags (Charset, X-UA Compatible and Viewport) need to come first in the head.* * [ ] **Charset:** ![High][high_img] The charset declared (UTF-8) is declared correctly. ```html ``` * [ ] **X-UA-Compatible:** ![Medium][medium_img] The X-UA-Compatible meta tag is present. ```html ``` > πŸ“– [Specifying legacy document modes (Internet Explorer)](https://msdn.microsoft.com/en-us/library/jj676915(v=vs.85).aspx) * [ ] **Viewport:** ![High][high_img] The viewport is declared correctly ```html ``` * [ ] **Title:** ![High][high_img] A title is used on all pages (SEO: No more than 65 characters, website title included) ```html Page Title less than 65 characters ``` > πŸ“– [Title - HTML | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title) * [ ] **Description:** ![High][high_img] A meta description is provided, it is unique and doesn't possess more than 150 characters. ```html ``` * [ ] **Favicons:** ![Medium][medium_img] Each favicon has been created and displays correctly. If you have only a `favicon.ico`, put it at the root of your site. Normally you won't need to use any markup. However, it's still good practice to link to it using the example below. Today, **PNG format is recommended** over `.ico` format (dimensions: 32x32px) ```html ``` > * πŸ›  [Favicon Generator](https://www.favicon-generator.org/) > * πŸ›  [RealFaviconGenerator](https://realfavicongenerator.net/) > * πŸ“– [Favicon Cheat Sheet](https://github.com/audreyr/favicon-cheat-sheet) > * πŸ“– [Favicons, Touch Icons, Tile Icons, etc. Which Do You Need? - CSS Tricks](https://css-tricks.com/favicon-quiz/) > * πŸ“– [PNG favicons - caniuse](https://caniuse.com/#feat=link-icon-png) * [ ] **Apple Touch Icon:** ![Low][low_img] Apple touch favicon apple-mobile-web-app-capable are present. *(Create your Apple Icon file with at least 200x200px dimension to support all dimensions that you may need)* ```html ``` > πŸ“– [Configuring Web Applications](https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html) * [ ] **Canonical:** ![Medium][medium_img] Use `rel="canonical"` to avoid duplicate content. ```html ``` ### HTML tags * [ ] **Language tag:** ![High][high_img] The language tag of your website is specified and related to the language of the current page. ```html ``` * [ ] **Direction tag:** ![Medium][medium_img] The direction of lecture is specified on the body tag (It can be used on another HTML tag). ```html ``` > πŸ“– [dir - HTML | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) * [ ] **Alternate language:** ![Low][low_img] The language tag of your website is specified and related to the language of the current page. ```html ``` * [ ] **Conditional comments:** ![Low][low_img] Conditional comments are present for IE if needed. > πŸ“– [About conditional comments (Internet Explorer) - MSDN - Microsoft](https://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx) * [ ] **RSS feed:** ![Low][low_img] If your project is a blog or has articles, an RSS link was provided. * [ ] **CSS Critical:** ![Medium][medium_img] The CSS critical (or "above the fold") collects all the CSS used to render the visible portion of the page. It is embedded before your principal CSS call and between `` in a single line (minified). > πŸ›  [Critical by Addy Osmany on Github](https://github.com/addyosmani/critical) * [ ] **CSS order:** ![High][high_img] All CSS files are loaded before any JavaScript files in the ``. (Except the case where sometimes JS files are loaded asynchronously on top of your page). ### Social meta ***Facebook OG*** and ***Twitter Cards*** are, for any website, highly recommended. The other social media tags can be considered if you target a particular presence on those and want to ensure the display. * [ ] **Facebook Open Graph:** ![Low][low_img] All Facebook Open Graph (OG) are tested and no one is missing or with a false information. Images need to be at least 600 x 315 pixels, 1200 x 630 pixels recommended. ```html ``` > * πŸ“– [A Guide to Sharing for Webmasters](https://developers.facebook.com/docs/sharing/webmasters/) > * πŸ›  Test your page with the [Facebook OG testing](https://developers.facebook.com/tools/debug/) * [ ] **Twitter Card:** ![Low][low_img] ```html ``` > * πŸ“– [Getting started with cards β€” Twitter Developers](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started) > * πŸ›  Test your page with the [Twitter card validator](https://cards-dev.twitter.com/validator) **[⬆ back to top](#table-of-contents)** --- ## HTML ### Best practices * [ ] **HTML5 Semantic Elements:** ![High][high_img] HTML5 Semantic Elements are used appropriately (header, section, footer, main...) > πŸ“– [HTML Reference](http://htmlreference.io/) * [ ] **Error pages:** ![High][high_img] Error 404 page and 5xx exist. Remember that the 5xx error page needs to have his CSS integrated (no external call on the current server). * [ ] **Noopener:** ![Medium][medium_img] In case you are using external links with `target="_blank"`, your link should have a `rel="noopener"` attribute to prevent tab nabbing. If you need to support older versions of Firefox, use `rel="noopener noreferrer"`. > πŸ“– [About rel=noopener](https://mathiasbynens.github.io/rel-noopener/) * [ ] **Clean up comments:** ![Low][low_img] Unnecessary code needs to be removed before sending the page to production. ### HTML testing * [ ] **W3C compliant:**: ![High][high_img] All pages need to be tested with the W3C validator to identify possible issues in the HTML code. > πŸ›  [W3C validator](https://validator.w3.org/) * [ ] **HTML Lint:** ![High][high_img] I use tools to help me analyze any issues I could have on my HTML code. > πŸ›  [Dirty markup](https://dirtymarkup.com/) * [ ] **Desktop Browsers:** ![High][high_img] All pages were tested on all current desktop browsers (Safari, Firefox, Chrome, Internet Explorer, EDGE...). * [ ] **Mobile Browsers:** ![High][high_img] All pages were tested on all current mobile browsers (Native browser, Chrome, Safari...). * [ ] **Link checker:** ![High][high_img] There are no broken links in my page, verify that you don't have any 404 error. > πŸ›  [W3C Link Checker](https://validator.w3.org/checklink) * [ ] **Adblockers test:** ![Medium][medium_img] Your website shows your content correctly with adblockers enabled (You can provide a message encouraging people to disable their adblocker) - [ ] **Pixel perfect:** ![High][high_img] Pages are close to pixel perfect. Depending on the quality of the creatives, you may not be 100% accurate, but your page needs to be close to your template. > [Pixel Perfect - Chrome Extension](https://chrome.google.com/webstore/detail/perfectpixel-by-welldonec/dkaagdgjmgdmbnecmcefdhjekcoceebi?hl=en) **[⬆ back to top](#table-of-contents)** --- ## Webfonts * [ ] **Webfont format:** ![High][high_img] WOFF, WOFF2 and TTF are supported by all modern browsers. > * πŸ“– [WOFF - Web Open Font Format - Caniuse](https://caniuse.com/#feat=woff). > * πŸ“– [WOFF 2.0 - Web Open Font Format - Caniuse](https://caniuse.com/#feat=woff2). > * πŸ“– [TTF/OTF - TrueType and OpenType font support](https://caniuse.com/#feat=ttf) > * πŸ“– [Using @font-face - CSS-Tricks](https://css-tricks.com/snippets/css/using-font-face/) * [ ] **Webfont size:** ![High][high_img] Webfont sizes don't exceed 2 MB (all variants included) **[⬆ back to top](#table-of-contents)** --- ## CSS > **Notes:** Take a look at [CSS guidelines](https://cssguidelin.es/) and [Sass Guidelines](https://sass-guidelin.es/) followed by most Front-End developers. If you have a doubt about CSS properties, you can visit [CSS Reference](http://cssreference.io/). * [ ] **Responsive Web Design:** ![High][high_img] The website is using responsive web design. * [ ] **CSS Print:** ![Medium][medium_img] A print stylesheet is provided and is correct on each page. * [ ] **Preprocessors:** ![Medium][medium_img] Your page is using a CSS preprocessor ([Sass](http://sass-lang.com/) is preferred). * [ ] **Unique ID:** ![High][high_img] If IDs are used, they are unique to a page * [ ] **Reset CSS:** ![High][high_img] A CSS reset (reset, normalize or reboot) is used and up to date. *(If you are using a CSS Framework like Bootstrap or Foundation, a Normalize is already included into it.)* > * πŸ“– [Reset.css](https://meyerweb.com/eric/tools/css/reset/) > * πŸ“– [Normalize.css](https://necolas.github.io/normalize.css/) > * πŸ“– [Reboot](https://getbootstrap.com/docs/4.0/content/reboot/) * [ ] **JS prefix:** ![Low][low_img] All classes (or id- used in JavaScript files) begin with **js-** and are not styled into the CSS files. ```html
``` * [ ] **CSS embed or line:** ![High][high_img] Avoid at all cost the use of CSS embed or inline: only used for valid reasons (ex: background-image for slider, CSS critical). * [ ] **Vendor prefixes:** ![High][high_img] CSS vendor prefixes are used and are generated accordingly with your browser support compatibility. > πŸ›  [Autoprefixer CSS online](https://autoprefixer.github.io/) ### Performance - [ ] **Concatenation:** ![High][high_img] CSS files are concatenated in a single file *(Not for HTTP/2)* - [ ] **Minification:** ![High][high_img] All CSS files are minified. - [ ] **Non-blocking:** ![Medium][medium_img] CSS files need to be non-blocking to prevent the DOM from taking time to load. > * πŸ“– [loadCSS by filament group](https://github.com/filamentgroup/loadCSS) > * πŸ“– [Example of preload CSS using loadCSS](https://gist.github.com/thedaviddias/c24763b82b9991e53928e66a0bafc9bf) - [ ] **Unused CSS:** ![Low][low_img] Remove unused CSS > * πŸ›  [UnCSS Online](https://uncss-online.com/) πŸ›  > * πŸ›  [PurifyCSS](https://github.com/purifycss/purifycss) ### CSS testing * [ ] **Stylelint:** ![High][high_img] All CSS or SCSS files are without any errors. > * πŸ›  [stylelint, a CSS linter](https://stylelint.io/) > * πŸ“– [Sass guidelines](https://sass-guidelin.es/) * [ ] **Responsive web design:** ![High][high_img] All pages were tested at the following breakpoints: 320px, 768px, 1024px (can be more / different according to your analytics). * [ ] **CSS Validator:** ![Medium][medium_img] The CSS was tested and pertinent errors were corrected. > πŸ›  [CSS Validator](https://jigsaw.w3.org/css-validator/) * [ ] **Reading direction:** ![High][high_img] All pages need to be tested for LTR and RTL languages if they need to be supported. > * πŸ“– [Building RTL-Aware Web Apps & Websites: Part 1 | Mozilla Hacks](https://hacks.mozilla.org/2015/09/building-rtl-aware-web-apps-and-websites-part-1/) > * πŸ“– [Building RTL-Aware Web Apps & Websites: Part 2 | Mozilla Hacks](https://hacks.mozilla.org/2015/10/building-rtl-aware-web-apps-websites-part-2/) **[⬆ back to top](#table-of-contents)** --- ## Images > **Notes:** For a complete understanding of image optimization, check the free ebook **[Essential Image Optimization](https://images.guide/)** from Addy Osmani. ### Best practices * [ ] **Optimization:** ![High][high_img] All images are optimized to be rendered in the browser. WebP format could be used for critical pages (like Homepage). > * πŸ›  [Imagemin](https://github.com/imagemin/imagemin) > * πŸ›  Use [ImageOptim](https://imageoptim.com/) to optimise your images for free. * [ ] **Retina:** ![Low][low_img] You provide layout images x2 or 3x, support retina display. * [ ] **Sprite:** ![Medium][medium_img] Small images are in a sprite file (in the case of icons, they can be in an SVG sprite image). * [ ] **Width and Height:** ![High][high_img] All `` have height and width set (Don't specify px or %). > ***Note:*** Lots of developers assume that width and height are not compatible with responsive web design. It's absolutely not the case. * [ ] **Alternative text:** ![High][high_img] All `` have an alternative text which describe the image visually. * [ ] **Lazy loading:** ![Medium][medium_img] Images are lazyloaded (A noscript fallback is always provided). **[⬆ back to top](#table-of-contents)** --- ## JavaScript ### Best practices * [ ] **JavaScript Inline:** ![High][high_img] You don't have any JavaScript code inline (mixed with your HTML code). * [ ] **Concatenation:** ![High][high_img] JavaScript files are concatenated. * [ ] **Minification:** ![High][high_img] JavaScript files are minified (you can add the `.min` suffix). > [Minify Resources (HTML, CSS, and JavaScript)](https://developers.google.com/speed/docs/insights/MinifyResources) * [ ] **JavaScript security:** > [Guidelines for Developing Secure Applications Utilizing JavaScript](https://www.owasp.org/index.php/DOM_based_XSS_Prevention_Cheat_Sheet#Guidelines_for_Developing_Secure_Applications_Utilizing_JavaScript)* * [ ] **Non-blocking:** ![Medium][medium_img] JavaScript files are loaded asynchronously using `async` or deferred using `defer` attribute. > πŸ“– [Remove Render-Blocking JavaScript](https://developers.google.com/speed/docs/insights/BlockingJS) * [ ] **Modernizr:** ![Low][low_img] If you need to target some specific features you can use a custom Modernizr to add classes in your `` tag. > πŸ›  [Customize your Modernizr](https://modernizr.com/download?setclasses) ### JavaScript testing * [ ] **ESLint:** ![High][high_img] No errors are flagged by ESLint (based on your configuration or standards rules) > * πŸ“– [ESLint - The pluggable linting utility for JavaScript and JSX](https://eslint.org/) **[⬆ back to top](#table-of-contents)** --- ## Security ### Scan and check your web site > * [securityheaders.io](https://securityheaders.io/) > * [Observatory by Mozilla](https://observatory.mozilla.org/) > * [ASafaWeb - Automated Security Analyser for ASP.NET Websites](https://asafaweb.com/) ### Best practices * [ ] **HTTPS:** ![Medium][medium_img] HTTPS is used on every pages and for all external content (plugins, images...). > * πŸ›  [Let's Encrypt - Free SSL/TLS Certificates](https://letsencrypt.org/) > * πŸ›  [Free SSL Server Test](https://www.ssllabs.com/ssltest/index.html) > * πŸ“– [Strict Transport Security](http://caniuse.com/#feat=stricttransportsecurity) * [ ] **HTTP Strict Transport Security (HSTS):** ![Medium][medium_img] The HTTP header is set to 'Strict-Transport-Security'. > * πŸ›  [Check HSTS preload status and eligibility](https://hstspreload.org/) > * πŸ“– [HTTP Strict Transport Security Cheat Sheet - OWASP](https://www.owasp.org/index.php/HTTP_Strict_Transport_Security_Cheat_Sheet) > * πŸ“– [Transport Layer Protection Cheat Sheet - OWASP](https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet) * [ ] **Cross Site Request Forgery (CSRF):** ![High][high_img] Your are ensure that requests made to your server-side are legitimate and originate from your website / app to prevent CSRF attacks. > πŸ“– [Cross-Site Request Forgery (CSRF) Prevention Cheat Sheet - OWASP](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet) * [ ] **Cross Site Scripting (XSS):** ![High][high_img] Your page or website is free from XSS possible issues. > * πŸ“– [XSS (Cross Site Scripting) Prevention Cheat Sheet - OWASP](https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet) > * πŸ“– [DOM based XSS Prevention Cheat Sheet - OWASP](https://www.owasp.org/index.php/DOM_based_XSS_Prevention_Cheat_Sheet) * [ ] **Content Type Options** ![Medium] Prevents Google Chrome and Internet Explorer from trying to mime-sniff the content-type of a response away from the one being declared by the server. > * πŸ“– [X-Content-Type-Options - Scott Helme](https://scotthelme.co.uk/hardening-your-http-response-headers/#x-content-type-options) * [ ] **X-Frame-Options (XFO)** ![Medium] Protects your visitors against clickjacking attacks. > * πŸ“– [X-Frame-Options - Scott Helme](https://scotthelme.co.uk/hardening-your-http-response-headers/#x-frame-options) > * πŸ“– [RFC7034 - HTTP Header Field X-Frame-Options](https://tools.ietf.org/html/rfc7034) **[⬆ back to top](#table-of-contents)** --- ## Performance ### Best practices - [ ] **Weight page:** ![High][high_img] The weight of each page is between 0kb and 500kb > * πŸ›  [Website Page Analysis](https://tools.pingdom.com) > * πŸ“– [Size Limit: Make the Web lighter](https://evilmartians.com/chronicles/size-limit-make-the-web-lighter) - [ ] **Minified:** ![Medium][medium_img] Your HTML is minified > πŸ›  [W3C Validator](https://validator.w3.org/) * [ ] **Lazy loading:** ![Medium][medium_img] Images, scripts and CSS need to be lazy loaded to improve the response time of the current page (See details in their respective sections). * [ ] **Cookie size:** If you are using cookies be sure each cookie doesn't exceed 4096 bytes and your domaine name don't have more than 20 cookies. > * πŸ“– [Cookie specification: RFC 6265](https://tools.ietf.org/html/rfc6265) > * πŸ“– [Cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies) > * πŸ›  [Browser Cookie Limits](http://browsercookielimits.squawky.net/) ### Performance testing * [ ] **Google PageSpeed:** ![High][high_img] All your pages were tested (not only the homepage) and have min 90/100. > * πŸ›  [Google PageSpeed](https://developers.google.com/speed/pagespeed/insights/) > * πŸ›  [Test your mobile speed with Google](https://testmysite.withgoogle.com) > * πŸ›  [WebPagetest - Website Performance and Optimization Test](https://www.webpagetest.org/) **[⬆ back to top](#table-of-contents)** --- ## Accessibility > **Notes:** You can watch the playlist [A11ycasts with Rob Dodson](https://www.youtube.com/playlist?list=PLNYkxOF6rcICWx0C9LVWWVqvHlYJyqw7g) πŸ“Ή ### Best practices - [ ] **Progressive enhancement:** ![Medium][medium_img] Major functionality like main navigation and search should work without JavaScript enabled. > πŸ“– [Enable / Disable JavaScript in Chrome Developer Tools](https://www.youtube.com/watch?v=kBmvq2cE0D8) - [ ] **Color contrast:** ![Medium][medium_img] Color contrast should at least pass WCAG AA (AAA for mobile) > πŸ›  [Contrast ratio](https://leaverou.github.io/contrast-ratio/) #### Headings * [ ] **H1:** ![High][high_img] All pages have an H1 which is not the title of the website. * [ ] **Headings:** ![High][high_img] Headings should be used properly in the right order (H1 to H6) > πŸ“Ή [Why headings and landmarks are so important -- A11ycasts #18](https://www.youtube.com/watch?v=vAAzdi1xuUY&index=9&list=PLNYkxOF6rcICWx0C9LVWWVqvHlYJyqw7g) #### Landmarks - [ ] **Role banner:** ![High][high_img] `
` has `role="banner"` - [ ] **Role navigation:** ![High][high_img] `