Skip to content

jimmyhappy19920308/Front-End-Checklist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

前端檢查清單

Join the chat at https://gitter.im/Front-End-Checklist/Lobby Front‑End_Checklist followed Contributors CC0

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. 這個 前端檢查清單 是個所有要素你須要有檢驗的全面清單,在啟動你的網站 / 頁面 HTML 到產品之前.

It is based on Front-End developers' years of experience, with the additions coming from some other open-source checklists. 他是基於前端開發的多年經驗,隨著從一些其他開源檢查清單增加.

內容目錄

  1. Head
  2. HTML
  3. 網頁字體
  4. CSS
  5. 圖像
  6. JavaScript
  7. 安全性
  8. 效能
  9. 易用性
  10. SEO

如何使用?

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: 所有項目在這個 前端檢查表 中被要求對於大多數的專案, 但有些元素可以被忽略或不是完全必要的(舉例來說在這一個管理網頁應用程式的例子裡, 你也許不需要 RSS 訂閱). 我們選擇使用彈性的三個等級:

  • Low means that the item is recommended but can be omitted in some particular situations.
  • Low 意味著這個項目是 被推薦的 但可以被忽略在有些特定的情況.
  • Medium 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.
  • Medium 意味著這個項目是 高度被推薦的 以及可以最終被忽略在有些真正地特定的例子中. 有些要素, 如果忽略, 可能有壞的影響在項目的效能或 SEO 中.
  • High 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.
  • High 意味著這個項目是 不能被忽略 依據任何理由. 你也許引起一個功能障礙在你的頁面或有無障礙或 SEO 議題.這個檢驗優先級必須是首要的在那些要素之上.

Some resources possess an emoticon to help you understand which type of content / help you may find on the checklist: 有些資源擁有一個表情符號為了幫助你了解內容的種類 / 為了幫助你可以在這個檢查表上發現:

  • 📖: documentation or article
  • 📖: 文件 or 文章
  • 🛠: online tool / testing tool
  • 🛠: 線上工具 / 檢驗工具
  • 📹: media or video content
  • 📹: 媒體或影片內容

Head

注意: 你可以發現 每件事的一個清單 可以被發現在這個 <head> 中的一個 HTML 文件.

Meta 標籤

  • Doctype: High The Doctype is HTML5 and is at the top of all your HTML pages.
  • 文件種類: High 這個文件種類是 HTML5 以及是在這個頂部的所有你的 HTML 頁面.
<!-- Doctype HTML5 -->
<!-- 文件種類 HTML5 -->
<!doctype html>

📖 確定最少字符編碼 - HTML5 W3C

The next 3 meta tags (Charset, X-UA Compatible and Viewport) need to come first in the head. 接下來的 3 個 meta 標籤 (Charset, X-UA Compatible and Viewport) need to come first in the head.

  • Charset: High The charset declared (UTF-8) is declared correctly.
  • Charset: High 這個 charset 宣告 (UTF-8) 被宣告正確地.
<!-- Set character encoding for the document -->
<!-- 設定字符編碼給這個文件 -->
<meta charset="utf-8">
  • X-UA-Compatible: Medium The X-UA-Compatible meta tag is present.
  • X-UA-Compatible: Medium 這個 X-UA-Compatible meta 標籤出現在.
<!-- Instruct Internet Explorer to use its latest rendering engine -->
<!-- 通知 IE 使用它的最新版渲染引擎 -->
<meta http-equiv="x-ua-compatible" content="ie=edge">

📖 指定傳統文件模式 (Internet Explorer)

  • Viewport: High The viewport is declared correctly.
  • 視埠: High 這個視埠被正確地宣告.
<!-- Viewport for responsive web design -->
<!-- 視埠為了響應式網頁設計 -->
<meta name="viewport" content="width=device-width, initial-scale=1">
  • Title: High A title is used on all pages (SEO: Google calculate the pixel width of the characters used in the title, cut off between 472 and 482 pixels. Average character limit would be around 55-characters).
  • 標題: High 一個標題被用來在每個頁面上 (SEO: Google 計算像素寬度的字符使用在標題中, 減少在 472 以及 482 像素之間. 平均字符限制將會是約 55 個字符).
<!-- Document Title -->
<!-- 文件標題 -->
<title>Page Title less than 65 characters 頁面標題少於 65 字符</title>

📖 Title - HTML - MDN

  • Description: High A meta description is provided, it is unique and doesn't possess more than 150 characters.
  • 描述: High 一個 meta 描述被提供, 他是獨一和不擁有超過 150 字符.
<!-- Meta Description -->
<!-- Meta 描述 -->
<meta name="description" content="Description of the page less than 150 characters 頁面少於 150 字符的描述">
  • Favicons: Medium 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).
  • 網站圖示: Medium 每個網站圖示 已經被創造和顯示正確. 如果你只有一個 favicon.ico, 放置它在你的網站根目錄. 正常情況下你不必使用任何標記. 然而, 使用下面的示例鏈接到它仍然是好的練習. 今天, PNG 格式被推薦 超過 .ico 格式 (尺寸: 32x32px).
<!-- Standard favicon -->
<!-- 標準網站圖示 -->
<link rel="icon" type="image/x-icon" href="https://example.com/favicon.ico">
<!-- Recommended favicon format -->
<!-- 推薦網站圖示格式 -->
<link rel="icon" type="image/png" href="https://example.com/favicon.png">
  • Apple Touch Icon: Low 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)
  • 蘋果觸碰圖像: Low 蘋果觸碰網站圖像出現在 蘋果-移動-網頁-應用程式-能力. (創建你的蘋果圖像檔案用至少 200x200px 尺寸來支持所有尺寸你可能需要)
<!-- Apple Touch Icon -->
<!-- 蘋果觸碰圖像 -->
<link rel="apple-touch-icon" href="/custom-icon.png">

📖 配置網頁應用程式

  • Windows Tiles:Low Windows tiles are present and linked.
  • 視窗瓦片:Low 視窗瓦片鏈結和出現在.
<!-- Microsoft Tiles -->
<!-- 微軟瓦片 -->
<meta name="msapplication-config" content="browserconfig.xml" />

Minimum required xml markup for the browserconfig.xml file is as follows: browserconfig.xml 檔案的最小所需 xml 標記如下:

<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
   <msapplication>
     <tile>
        <square70x70logo src="small.png"/>
        <square150x150logo src="medium.png"/>
        <wide310x150logo src="wide.png"/>
        <square310x310logo src="large.png"/>
     </tile>
   </msapplication>
</browserconfig>

📖 瀏覽器配置 schema 參考

  • Canonical: Medium Use rel="canonical" to avoid duplicate content.
  • 典範: Medium 使用 rel="canonical" 避免複製內容.
<!-- Helps prevent duplicate content issues -->
<!-- 幫助避免重複內容議題 -->
<link rel="canonical" href="http://example.com/2017/09/a-new-article-to-red.html">

HTML 標籤

  • Language attribute: High The lang attribute of your website is specified and related to the language of the current page.
  • Language attribute: High 你的網站的 lang 屬性被指定以及當前頁面相關語言.
<html lang="en">
  • Direction tag: Medium The direction of lecture is specified on the body tag (It can be used on another HTML tag).
  • 方向標籤: Medium 演講的方向被指定在這個 body 標籤上 (它可以被用來在其他的 HTML 標籤).
<html dir="rtl">

📖 dir - HTML - MDN

  • Alternate language: Low The language tag of your website is specified and related to the language of the current page.
  • 替代語言: Low 你的網站的語言標籤被指定以及相關當前頁面的語言.
<link rel="alternate" href="https://es.example.com/" hreflang="es">
  • Conditional comments: Low Conditional comments are present for IE if needed.
  • 條件註解: Low 條件註解出現在 IE 如果需要.

📖 關於條件註解 (Internet Explorer) - MSDN - Microsoft

  • RSS feed: Low If your project is a blog or has articles, an RSS link was provided.

  • RSS 訂閱: Low 如果你的專案是部落格或有文章, 一個 RSS 鏈結被提供.

  • CSS Critical: Medium 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 <style></style> in a single line (minified).

  • ** CSS 關鍵:** Medium 這個 CSS 關鍵 (或是 "位置明顯") 蒐集所有 CSS 曾經渲染這個頁面的可視部分. 它被嵌入在你的主要的 CSS 呼叫之前 以及 在 <style></style> 之間在一行中 (縮小的).

🛠 關鍵由 Addy Osmani 在 Github 上

  • CSS order: High All CSS files are loaded before any JavaScript files in the <head>. (Except the case where sometimes JS files are loaded asynchronously on top of your page).
  • CSS 順序: High 所有 CSS 檔案被裝載在任何 JavaScript 檔案之前在 <head> 中. (除了這個例子有時 JS 檔案被非同步地裝載在你的頁面的頂部).

社交 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 OG 以及 Twitter 卡片 , 對於任何網站, 高度推薦. 其他社交媒體標籤可能被週密考慮過假如你針對特定的存在在那些網站上以及想要確保顯示.

  • Facebook Open Graph: Low 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.
  • Facebook 開放圖表: Low 所有 Facebook 開放圖表 (OG) 被檢驗 以及沒一個錯過或是伴隨著一個錯誤資訊. 圖像最少必須是 600 x 315 像素, 1200 x 630 像素被推薦.
<meta property="og:type" content="website">
<meta property="og:url" content="https://example.com/page.html">
<meta property="og:title" content="Content Title">
<meta property="og:image" content="https://example.com/image.jpg">
<meta property="og:description" content="Description Here">
<meta property="og:site_name" content="Site Name">
<meta property="og:locale" content="en_US">
  • Twitter Card: Low
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@site_account">
<meta name="twitter:creator" content="@individual_account">
<meta name="twitter:url" content="https://example.com/page.html">
<meta name="twitter:title" content="Content Title">
<meta name="twitter:description" content="Content description less than 200 characters">
<meta name="twitter:image" content="https://example.com/image.jpg">

⬆ 回到頂部


HTML

最好的練習

  • HTML5 Semantic Elements: High HTML5 Semantic Elements are used appropriately (header, section, footer, main...).
  • HTML5 語意元素: High HTML5 語意元素使用適當地 (header, section, footer, main...).

📖 HTML 參考

  • Error pages: High 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).

  • 錯誤頁面: High 錯誤 404 頁面以及 5xx 存在. 記住 5xx 錯誤頁面必須有他的 CSS 合併 (沒有外部呼叫在正確的伺服器上).

  • Noopener: Medium 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".

  • Noopener: Medium 在這個例子你使用外部鏈結伴隨著 target="_blank", 你的鏈結應該有一個 rel="noopener" 屬性為了避免 tab 突然抓住. 如果你必須支援火狐的舊版本, 使用 rel="noopener noreferrer".

📖 關於 rel=noopener

  • Clean up comments: Low Unnecessary code needs to be removed before sending the page to production.
  • 清理註解: Low 不必要的程式碼必須被移除在頁面成為產品前.

HTML 檢驗

  • W3C compliant: High All pages need to be tested with the W3C validator to identify possible issues in the HTML code.
  • W3C 兼容: High 所有頁面必須被檢驗用這個 W3C 驗證器識別可能議題在這個 HTML 程式碼中.

🛠 W3C 驗證器

  • HTML Lint: High I use tools to help me analyze any issues I could have on my HTML code.
  • HTML Lint: High 我使用工具幫助我分析任何議題我能有在我的 HTML程式碼中.

🛠 骯髒的標記

  • Desktop Browsers: High All pages were tested on all current desktop browsers (Safari, Firefox, Chrome, Internet Explorer, EDGE...).

  • 桌面板瀏覽器: High 所有頁面被檢驗在所有現在的桌面板瀏覽器 (Safari, Firefox, Chrome, Internet Explorer, EDGE...).

  • Mobile Browsers: High All pages were tested on all current mobile browsers (Native browser, Chrome, Safari...).

  • 行動版瀏覽器: High 所有頁面被檢驗在所有現在的行動版瀏覽器上 (Native browser, Chrome, Safari...).

  • Link checker: High There are no broken links in my page, verify that you don't have any 404 error.

  • 鏈結檢查: High 沒有損壞的鏈結在我的頁面中, 檢驗你沒有任何 404 錯誤.

🛠 W3C 檢查鏈結

  • Adblockers test: Medium Your website shows your content correctly with adblockers enabled (You can provide a message encouraging people to disable their adblocker).
  • 廣告攔截器檢驗: Medium 你的網站正確顯示你的內容有啟用了廣告攔截器 (你可以提供一個訊息鼓勵人們關閉他們的廣告攔截器).

⬆ 回到頂部


網頁字體

  • Webfont format: High WOFF, WOFF2 and TTF are supported by all modern browsers.
  • 網頁字體格式: High WOFF, WOFF2 以及 TTF 被所有現代瀏覽器支援.
  • Webfont size: High Webfont sizes don't exceed 2 MB (all variants included).
  • 網頁字體大小: High 網頁字體大小不超過 2 MB (包含所有變型).

⬆ 回到頂部


CSS

注意: 看一眼 CSS 指南 以及Sass 指南 跟隨大多數前端開法者. 如果你對 CSS 屬性有疑問, 你可以拜訪 CSS 參考.

  • Responsive Web Design: High The website is using responsive web design.
  • 響應式網頁設計: High 網頁使用響應式設計.
  • CSS Print: Medium A print stylesheet is provided and is correct on each page.
  • CSS 列印: Medium 一個列印樣式表被提供以及正確在每個頁面.
  • Preprocessors: Medium Your page is using a CSS preprocessor (Sass is preferred).
  • 預處理器: Medium 你個頁面使用一個 CSS 預處理器 (Sass 是首選).
  • Unique ID: High If IDs are used, they are unique to a page.
  • 獨一的 ID: High 如果 IDs 被使用,它們是一個頁面唯一的.
  • Reset CSS: High 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.)
  • 重置 CSS: High 一個 CSS 重置 (reset, normalize or reboot) 被使用而且是最新的. (如果你使用一個 CSS 框架像 Bootstrap 或是 Foundation, 一個 Normalize 已經被包含進去.)
  • JS prefix: Low All classes (or id- used in JavaScript files) begin with js- and are not styled into the CSS files.
  • JS 前綴: Low 所有 classes (或是 id- 使用在 JavaScript 檔案中) 首先 js- 以及不是進入CSS檔案樣式.
<div id="js-slider" class="my-slider">
<!-- Or -->
<div id="id-used-by-cms" class="js-slider my-slider">
  • CSS embed or line: High Avoid at all cost the use of CSS embed or inline: only used for valid reasons (ex: background-image for slider, CSS critical).
  • CSS 嵌入或行內: High 避免所有嵌入或是行內花費: 只用於有效原因 (ex: 背景圖對於 slider, CSS 關鍵).
  • Vendor prefixes: High CSS vendor prefixes are used and are generated accordingly with your browser support compatibility.
  • 供應商前綴: High CSS 供應商前綴被使用以及被產生因此伴隨著你的瀏覽器支持兼容性.

🛠 線上自動前綴 CSS

效能

  • Concatenation: High CSS files are concatenated in a single file. (Not for HTTP/2)
  • 合併: High CSS 檔案被合併在一個單一檔案中. (不適用於 HTTP/2)
  • Minification: High All CSS files are minified.
  • 縮小: High 所有 CSS 檔案被縮小.
  • Non-blocking: Medium CSS files need to be non-blocking to prevent the DOM from taking time to load.
  • 非阻塞: Medium CSS 檔案必須是非阻塞為了避免 DOM 從花費時間加載.
  • Unused CSS: Low Remove unused CSS.
  • 未使用的 CSS: Low 刪除未使用的 CSS.

CSS 檢驗

  • Stylelint: High All CSS or SCSS files are without any errors.
  • Stylelint: High 所有 CSS 或是 SCSS 檔案沒有任何錯誤.
  • Responsive web design: High All pages were tested at the following breakpoints: 320px, 768px, 1024px (can be more / different according to your analytics).

  • 響應式網頁設計: High 所有頁面被檢驗在以下斷點: 320px, 768px, 1024px (根據您的分析可以是更多 / 不同).

  • CSS Validator: Medium The CSS was tested and pertinent errors were corrected.

  • CSS 驗證器: Medium 這個 CSS 被檢驗以及相關錯誤得到糾正.

  • Desktop Browsers: High All pages were tested on all current desktop browsers (Safari, Firefox, Chrome, Internet Explorer, EDGE...).
  • 桌面版瀏覽器: High 所有頁面都在當前所有桌面瀏覽器上進行了檢驗 (Safari, Firefox, Chrome, Internet Explorer, EDGE...).
  • Mobile Browsers: High All pages were tested on all current mobile browsers (Native browser, Chrome, Safari...).
  • 行動版瀏覽器: High 所有頁面都在當前所有的移動瀏覽器上進行檢驗 (Native browser, Chrome, Safari...).
  • OS: High All pages were tested on all current OS (Windows, Android, iOS, Mac...).
  • 作業系統: High 所有頁面都在當前操作系統上進行了檢驗 (Windows, Android, iOS, Mac...).
  • Pixel perfect: High 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.
  • 完美像素: High 頁面接近完美像素. 取決於創意的品質, 你可能不會 100% 準確, 但你的頁面必須是接近你的模板.

完美像素 - Chrome 擴充套件

  • Reading direction: High All pages need to be tested for LTR and RTL languages if they need to be supported.
  • 閱讀方向: High 所有頁面必須檢驗 LTR 和 RTL 語言 假如他們需要被支援.

⬆ 回到頂部


圖像

注意: 為了圖像優化的完整了解, 檢查免費電子書 基本圖像優化 來自 Addy Osmani.

最好的練習

  • Optimization: High All images are optimized to be rendered in the browser. WebP format could be used for critical pages (like Homepage).
  • 優化: High 所有圖像都被優化以呈現在瀏覽器中. WebP 格式可用於關鍵頁面 (像首頁).
  • 🛠 Imagemin
  • 🛠 使用 ImageOptim 免費優化你的圖片.
  • 🛠 使用 Kraken.io 對於 png 和 jpg 優化,使用Kraken.io非常棒的替代方法. 在免費計畫上每個文件最多可達 1 mb .
  • Picture/Srcset: Medium You use picture/srcset to provide the most appropriate image for the current viewport of the user.
  • 照片/來源設定: Medium 你可以使用照片/來源設定來提供最合適的圖像給用戶的當前視埠.
  • Retina: Low You provide layout images 2x or 3x, support retina display.
  • 視網膜: Low 您提供 2x 或 3x 的佈局圖像,支持視網膜顯示.
  • Sprite: Medium Small images are in a sprite file (in the case of icons, they can be in an SVG sprite image).
  • 大圖: Medium 小圖像在一個大圖檔案中 (在圖標的情況下, 他們可以在一個 SVG 大圖圖像中).
  • Width and Height: High Set width and height attributes on <img> if the final rendered image size is known (can be omitted for CSS sizing).
  • 寬度和高度: High 設置 width 以及 height 屬性在 <img> 上 假如最終渲染圖像大小被知道 (can be omitted for CSS sizing).
  • Alternative text: High All <img> have an alternative text which describe the image visually.
  • 替代文字: High 所走 <img> 有一個替代文字它直觀地描述了圖像.
  • Lazy loading: Medium Images are lazyloaded (A noscript fallback is always provided).
  • 懶加載: Medium 圖像被懶加載 (一個沒有腳本回呼總是被提供).

⬆ 回到頂部


JavaScript

最好的練習

  • JavaScript Inline: High You don't have any JavaScript code inline (mixed with your HTML code).
  • JavaScript 行內: High 你沒有任何JavaScript行內代碼(mixed with your HTML code).
  • Concatenation: High JavaScript files are concatenated.
  • 合併: High JavaScript 檔案被合併.
  • Minification: High JavaScript files are minified (you can add the .min suffix).
  • 縮小: High JavaScript 檔案被縮小 (你可以增加 .min 後綴).
  • JavaScript 安全性:
  • Non-blocking: Medium JavaScript files are loaded asynchronously using async or deferred using defer attribute.
  • 非阻塞: Medium JavaScript 檔案被讀取非同步地使用 async 或是延遲地 defer 屬性.
  • Modernizr: Low If you need to target some specific features you can use a custom Modernizr to add classes in your <html> tag.
  • Modernizr: Low 如果您需要定位一些特定功能你可以使用一個客製 Modernizr 增加 classes 在你的 <html> 標籤中.

JavaScript 檢驗

  • ESLint: High ESLint 沒有標記錯誤 (根據您的配置或標準規則).

⬆ 回到頂部


安全

掃描並檢查您的網站

最好的練習

  • HTTPS: Medium HTTPS is used on every pages and for all external content (plugins, images...).
  • HTTPS: Medium 每個頁面都使用 HTTPS 以及適用於所有外部內容 (套件, 圖像...).
  • HTTP Strict Transport Security (HSTS): Medium The HTTP header is set to 'Strict-Transport-Security'.
  • HTTP 嚴格的運輸安全 (HSTS): Medium HTTP 標頭設置為 '嚴格傳輸安全'.
  • Cross Site Request Forgery (CSRF): High You ensure that requests made to your server-side are legitimate and originate from your website / app to prevent CSRF attacks.
  • 跨站點請求偽造 (CSRF): High 您確保向服務器端發出請求是合法的以及來源自你的網站 / 應用程式以防止 CSRF 攻擊.
  • Cross Site Scripting (XSS): High Your page or website is free from XSS possible issues.
  • 跨網站腳本 (XSS): High 你的頁面或網站沒有 XSS 的可能議題.
  • 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.
  • 內容類型選項 Medium 防止 Google Chrome 和 Internet Explorer 嘗試模仿-嗅探內容類型遠離服務器聲明的響應.
  • X-Frame-Options (XFO) Medium Protects your visitors against clickjacking attacks.
  • X-框架-選項 (XFO) Medium 保護你的訪客抵抗點擊劫持攻擊.
  • Content Security Policy Medium Defines how content is loaded on your site and from where it is permitted to be loaded. Can also be used to protect against clickjacking attacks.
  • 內容安全策略 Medium 定義內容如何在你的網站被讀取以及從哪裡被允許加載. 也可以用來防護抵抗點擊劫持攻擊.

⬆ 回到頂部


效能

最好的練習

  • Weight page: High The weight of each page is between 0 and 500 KB.
  • 頁面寬度: High 每個頁面的寬度介於 0 到 500 KB 之間.
  • 縮小: Medium Your HTML is minified.
  • 縮小: Medium 你的 HTML 被縮小.
  • Lazy loading: Medium Images, scripts and CSS need to be lazy loaded to improve the response time of the current page (See details in their respective sections).

  • 懶加載 Medium 圖像, 腳本 以及 CSS 必須是懶加載改善反應當前頁面時間(查看細節在他們的各自部分).

  • Cookie size: If you are using cookies be sure each cookie doesn't exceed 4096 bytes and your domain name doesn't have more than 20 cookies.

  • Cookie 大小: 如果你使用 cookies 確定每個 cookie 不超過 4096 位元組以及你的網域名稱沒有多於 20 個 cookies.

  • Third party components: Medium Third party iframes or components relying on external JS (like sharing buttons) are replaced by static components when possible, thus limiting calls to external APIs and keeping your users activity private.
  • 第三方組件: Medium 第三方内嵌框架或組件依賴在外部 JS 上 (像是分享按紐)在可能的情況下被靜態組件代替, 因此限制呼叫外部 APIs 以及保持你的使用者私人活動.

準備即將到來的請求

  • DNS resolution: Low DNS of third-party services that may be needed are resolved in advance during idle time using dns-prefetch.
  • DNS 決議案: Low 第三方服務的 DNS 可能需要提前解決在閒置時間使用 dns-prefetch 期間.
<link rel="dns-prefetch" href="https://example.com">
  • Preconnection: Low DNS lookup, TCP handshake and TLS negociation with services that will be needed soon is done in advance during idle time using preconnect.
  • 預連接: Low DNS 查找, TCP 握手以及 TLS 協商與服務這將很快需要提前完成在閒置時間使用 preconnect 期間.
<link rel="preconnect" href="https://example.com">
  • Prefetching: Low Resources that will be needed soon (e.g. lazy loaded images) are requested in advance during idle time using prefetch.
  • 預拿取: Low 資源不久將被需要 (e.g. 懶加載圖像)提前被請求在閒置時間使用 prefetch 期間.
<link rel="prefetch" href="image.png">
  • Preloading: Low Resources needed in the current page (e.g. scripts placed at the end of <body>) in advance using preload.
  • 預加載: Low 資源需要在當前頁面中 (e.g. 腳本放在 <body> 的末尾) 在提前使用 preload 中.
<link rel="preload" href="app.js">

效能檢驗

  • Google PageSpeed: High All your pages were tested (not only the homepage) and have a score of at least 90/100.
  • Google 頁面速度: High 所有你的頁面被檢驗 (不只有首頁) 以及分數最少有 90/100.

⬆ 回到頂部


易用性

注意: 你可以觀看播放列表 A11ycasts with Rob Dodson 📹

最好的練習

  • Progressive enhancement: Medium Major functionality like main navigation and search should work without JavaScript enabled.
  • 漸進增強: Medium 主要功能像主導航和搜索應該作用沒有啟用 JavaScript .
  • Color contrast: Medium Color contrast should at least pass WCAG AA (AAA for mobile).
  • 顏色對比: Medium 顏色對比應該最少通過 WCAG AA (AAA for 行動版).

內容標題

  • H1: High All pages have an H1 which is not the title of the website.
  • H1: High 所有頁面有一個 H1 不是網站的標題.
  • Headings: High Headings should be used properly in the right order (H1 to H6).
  • 內容標題: High 內容標題應以正確的順序正確使用 (H1 to H6).

地標

  • Role banner: High <header> has role="banner".
  • 旗幟角色: High <header>role="banner".
  • Role navigation: High <nav> has role="navigation".
  • 導航角色: High <nav>role="navigation".
  • Role main: High <main> has role="main".
  • 主要角色: High <main> has role="main".

語義

  • Specific HTML5 input types are used: Medium This is especially important for mobile devices that show customized keypads and widgets for different types.
  • 具體 HTML5 輸入類型被使用: Medium 這個是特別重要對於行動裝置顯示定制鍵盤以及不同類型的小部件.

表單

  • Label: High A label is associated with each input form element. In case a label can't be displayed, use aria-label instead.
  • Label: High 標籤與每個輸入表單元素相關聯. 在案例中標籤無法顯示標籤, 使用 aria-label 取代.

易用性檢測

  • Accessibility standards testing: High Use the WAVE tool to test if your page respects the accessibility standards.
  • 易用性標準檢測: High 使用 WAVE 工具檢測如果你的頁面尊重易用性標準.
  • Keyboard navigation: High Test your website using only your keyboard in a previsible order. All interactive elements are reachable and usable.
  • 鍵盤導航: High 檢測你的網站僅使用您的鍵盤在可預見的順序中. 所有互動元素都可訪問和可用.
  • Screen-reader: Medium All pages were tested in a screen-reader (VoiceOver, ChromeVox, NVDA or Lynx).
  • 螢幕-渲染: Medium 所有頁面被檢測在螢幕-渲染中 (VoiceOver, ChromeVox, NVDA or Lynx).
  • Focus style: High If the focus is disabled, it is replaced by visible state in CSS.
  • 焦點樣式: High 如果這個焦點被禁用, 它被 CSS 中的可見狀態所取代.

⬆ 回到頂部


SEO

  • Google Analytics: High Google Analytics is installed and correctly configured.
  • Google 分析: High Google 分析被安裝以及正確地配置.
  • Headings logic: Medium Heading text helps to understand the content in the current page.
  • 標題邏輯: Medium 標題文字幫助了解內容在當前的頁面中.
  • sitemap.xml: High A sitemap.xml exists and was submitted to Google Search Console (previously Google Webmaster Tools).
  • sitemap.xml: High 一個 sitemap.xml 存在以及被提交給 Google 搜尋控制台 (以前的 Google 網站站長工具).
  • robots.txt: High The robots.txt is not blocking webpages.
  • robots.txt: High 這個 robots.txt 不是阻塞網頁.
  • Structured Data: High Pages using structured data are tested and are without errors. Structured data helps crawlers understand the content in the current page.
  • 結構化數據: High 檢驗了使用結構化數據的頁面以及沒有錯誤. 結構化數據幫助爬蟲了解在當前頁面中的內容.
  • Sitemap HTML: Medium An HTML sitemap is provided and is accessible via a link in the footer of your website.
  • Sitemap HTML: Medium 一個 HTML 網站地圖被提供以及可以訪問通過你的網站的頁尾中的鏈結.

⬆ 回到頂部


翻譯

The Front-End Checklist is also available in other languages. Thanks for all translators and their awesome work! 前端檢查清單也提供其他語言版本. 感謝所有的翻譯和他們棒極了的工作


前端檢查清單徽章

If you want to show you are following the rules of the Front-End Checklist, put this badge on your README file! 如果您想顯示您遵循前端檢查清單的規定,請將此徽章放在 README 檔案上!

跟隨前端_檢查清單

[![Front‑End_Checklist followed](https://img.shields.io/badge/Front‑End_Checklist-followed-brightgreen.svg)](https://github.com/thedaviddias/Front-End-Checklist/)

⬆ 回到頂部


貢獻

Open an issue or a pull request to suggest changes or additions. 打開一個議題或是一個拉請求建議改變或是增加.

指南

The Front-End Checklist repository consists of two branches: The Front-End Checklist 資料庫由兩個分支組成:

1. 主要的

This branch consists of the README.md file that is automatically reflected on the Front-End Checklist website. 該分支由 README.md 文件組成被自動反映在 [前端檢查清單] 網站上(http://frontendchecklist.com/) .

2. 開發

This branch will be used to make some significant changes to the structure, content if needed. It is preferable to use the master branch to fix small errors or add a new item. 這個分支將被用來做一些重要的事情改變結構, 內容如果需要. 它是優選使用主分支為了修理小錯誤或是增加新項目.

貢獻者

Check out all the super awesome contributors. 看看所有超級棒的 貢獻者.

支援

If you have any question or suggestion, don't hesitate to use Gitter or Twitter: 如果您有任何問題或建議, 不要猶豫使用 Gitter 或是 Twitter:

作者

David Dias

許可證

CC0

⬆ 回到頂部

About

🗂 The perfect Front-End Checklist for modern websites and meticulous developers

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published