-
Notifications
You must be signed in to change notification settings - Fork 2
Audit result from lighthouse
小乙哥 edited this page Jul 3, 2019
·
2 revisions
id | title | description |
---|---|---|
first-contentful-paint | First Contentful Paint | First Contentful Paint marks the time at which the first text or image is painted. Learn more. |
first-meaningful-paint | First Meaningful Paint | First Meaningful Paint measures when the primary content of a page is visible. Learn more. |
speed-index | Speed Index | Speed Index shows how quickly the contents of a page are visibly populated. Learn more. |
interactive | Time to Interactive | Time to interactive is the amount of time it takes for the page to become fully interactive. Learn more. |
first-cpu-idle | First CPU Idle | First CPU Idle marks the first time at which the page's main thread is quiet enough to handle input. Learn more. |
max-potential-fid | Max Potential First Input Delay | The maximum potential First Input Delay that your users could experience is the duration, in milliseconds, of the longest task. Learn more. |
estimated-input-latency | Estimated Input Latency | Estimated Input Latency is an estimate of how long your app takes to respond to user input, in milliseconds, during the busiest 5s window of page load. If your latency is higher than 50 ms, users may perceive your app as laggy. Learn more. |
render-blocking-resources | Eliminate render-blocking resources | Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles. Learn more. |
uses-responsive-images | Properly size images | Serve images that are appropriately-sized to save cellular data and improve load time. Learn more. |
offscreen-images | Defer offscreen images | Consider lazy-loading offscreen and hidden images after all critical resources have finished loading to lower time to interactive. Learn more. |
unminified-css | Minify CSS | Minifying CSS files can reduce network payload sizes. Learn more. |
unminified-javascript | Minify JavaScript | Minifying JavaScript files can reduce payload sizes and script parse time. Learn more. |
unused-css-rules | Remove unused CSS | Remove dead rules from stylesheets and defer the loading of CSS not used for above-the-fold content to reduce unnecessary bytes consumed by network activity. Learn more. |
uses-optimized-images | Efficiently encode images | Optimized images load faster and consume less cellular data. Learn more. |
uses-webp-images | Serve images in next-gen formats | Image formats like JPEG 2000, JPEG XR, and WebP often provide better compression than PNG or JPEG, which means faster downloads and less data consumption. Learn more. |
uses-text-compression | Enable text compression | Text-based resources should be served with compression (gzip, deflate or brotli) to minimize total network bytes. Learn more. |
uses-rel-preconnect | Preconnect to required origins | Consider adding preconnect or dns-prefetch resource hints to establish early connections to important third-party origins. Learn more. |
time-to-first-byte | Server response times are low (TTFB) | Time To First Byte identifies the time at which your server sends a response. Learn more. |
redirects | Avoid multiple page redirects | Redirects introduce additional delays before the page can be loaded. Learn more. |
uses-rel-preload | Preload key requests | Consider using to prioritize fetching resources that are currently requested later in page load. Learn more. |
efficient-animated-content | Use video formats for animated content | Large GIFs are inefficient for delivering animated content. Consider using MPEG4/WebM videos for animations and PNG/WebP for static images instead of GIF to save network bytes. Learn more |
total-byte-weight | Avoids enormous network payloads | Large network payloads cost users real money and are highly correlated with long load times. Learn more. |
uses-long-cache-ttl | Serve static assets with an efficient cache policy | A long cache lifetime can speed up repeat visits to your page. Learn more. |
dom-size | Avoids an excessive DOM size | Browser engineers recommend pages contain fewer than ~1,500 DOM elements. The sweet spot is a tree depth < 32 elements and fewer than 60 children/parent element. A large DOM can increase memory usage, cause longer style calculations, and produce costly layout reflows. Learn more. |
critical-request-chains | Minimize Critical Requests Depth | The Critical Request Chains below show you what resources are loaded with a high priority. Consider reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load. Learn more. |
user-timings | User Timing marks and measures | Consider instrumenting your app with the User Timing API to measure your app's real-world performance during key user experiences. Learn more. |
bootup-time | JavaScript execution time | Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this. Learn more. |
mainthread-work-breakdown | Minimize main-thread work | Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this. |
font-display | Ensure text remains visible during webfont load | Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading. Learn more. |
performance-budget | Performance budget | Keep the quantity and size of network requests under the targets set by the provided performance budget. Learn more. |
resource-summary | Keep request counts low and transfer sizes small | To set budgets for the quantity and size of page resources, add a budget.json file. Learn more. |
network-requests | Network Requests | Lists the network requests that were made during page load. |
network-rtt | Network Round Trip Times | Network round trip times (RTT) have a large impact on performance. If the RTT to an origin is high, it's an indication that servers closer to the user could improve performance. Learn more. |
network-server-latency | Server Backend Latencies | Server latencies can impact web performance. If the server latency of an origin is high, it's an indication the server is overloaded or has poor backend performance. Learn more. |
main-thread-tasks | Tasks | Lists the toplevel main thread tasks that executed during page load. |
diagnostics | Diagnostics | Collection of useful page vitals. |
metrics | Metrics | Collects all available metrics. |
screenshot-thumbnails | Screenshot Thumbnails | This is what the load of your site looked like. |
final-screenshot | Final Screenshot | The last screenshot captured of the pageload. |
id | title | description |
---|---|---|
accesskeys |
[accesskey] values are unique |
Access keys let users quickly focus a part of the page. For proper navigation, each access key must be unique. Learn more. |
aria-allowed-attr |
[aria-*] attributes match their roles |
Each ARIA role supports a specific subset of aria-* attributes. Mismatching these invalidates the aria-* attributes. Learn more. |
aria-required-attr |
[role] s have all required [aria-*] attributes |
Some ARIA roles have required attributes that describe the state of the element to screen readers. Learn more. |
aria-required-children | Elements with [role] that require specific children [role] s, are present |
Some ARIA parent roles must contain specific child roles to perform their intended accessibility functions. Learn more. |
aria-required-parent |
[role] s are contained by their required parent element |
Some ARIA child roles must be contained by specific parent roles to properly perform their intended accessibility functions. Learn more. |
aria-roles |
[role] values are valid |
ARIA roles must have valid values in order to perform their intended accessibility functions. Learn more. |
aria-valid-attr-value |
[aria-*] attributes have valid values |
Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid values. Learn more. |
aria-valid-attr |
[aria-*] attributes are valid and not misspelled |
Assistive technologies, like screen readers, can't interpret ARIA attributes with invalid names. Learn more. |
audio-caption |
<audio> elements contain a <track> element with [kind="captions"]
|
Captions make audio elements usable for deaf or hearing-impaired users, providing critical information such as who is talking, what they're saying, and other non-speech information. Learn more. |
button-name | Buttons have an accessible name | When a button doesn't have an accessible name, screen readers announce it as "button", making it unusable for users who rely on screen readers. Learn more. |
bypass | The page contains a heading, skip link, or landmark region | Adding ways to bypass repetitive content lets keyboard users navigate the page more efficiently. Learn more. |
color-contrast | Background and foreground colors do not have a sufficient contrast ratio. | Low-contrast text is difficult or impossible for many users to read. Learn more. |
definition-list |
<dl> 's contain only properly-ordered <dt> and <dd> groups, <script> or <template> elements. |
When definition lists are not properly marked up, screen readers may produce confusing or inaccurate output. Learn more. |
dlitem | Definition list items are wrapped in <dl> elements |
Definition list items (<dt> and <dd> ) must be wrapped in a parent <dl> element to ensure that screen readers can properly announce them. Learn more. |
document-title | Document has a <title> element |
The title gives screen reader users an overview of the page, and search engine users rely on it heavily to determine if a page is relevant to their search. Learn more. |
duplicate-id |
[id] attributes on the page are unique |
The value of an id attribute must be unique to prevent other instances from being overlooked by assistive technologies. Learn more. |
frame-title |
<frame> or <iframe> elements have a title |
Screen reader users rely on frame titles to describe the contents of frames. Learn more. |
html-has-lang |
<html> element has a [lang] attribute |
If a page doesn't specify a lang attribute, a screen reader assumes that the page is in the default language that the user chose when setting up the screen reader. If the page isn't actually in the default language, then the screen reader might not announce the page's text correctly. Learn more. |
html-lang-valid |
<html> element has a valid value for its [lang] attribute |
Specifying a valid BCP 47 language helps screen readers announce text properly. Learn more. |
image-alt | Image elements have [alt] attributes |
Informative elements should aim for short, descriptive alternate text. Decorative elements can be ignored with an empty alt attribute. Learn more. |
input-image-alt |
<input type="image"> elements have [alt] text |
When an image is being used as an <input> button, providing alternative text can help screen reader users understand the purpose of the button. Learn more. |
label | Form elements have associated labels | Labels ensure that form controls are announced properly by assistive technologies, like screen readers. Learn more. |
layout-table | Presentational <table> elements avoid using <th> , <caption> or the [summary] attribute. |
A table being used for layout purposes should not include data elements, such as the th or caption elements or the summary attribute, because this can create a confusing experience for screen reader users. Learn more. |
link-name | Links do not have a discernible name | Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves the navigation experience for screen reader users. Learn more. |
list | Lists contain only <li> elements and script supporting elements (<script> and <template> ). |
Screen readers have a specific way of announcing lists. Ensuring proper list structure aids screen reader output. Learn more. |
listitem | List items (<li> ) are contained within <ul> or <ol> parent elements |
Screen readers require list items (<li> ) to be contained within a parent <ul> or <ol> to be announced properly. Learn more. |
meta-refresh | The document does not use <meta http-equiv="refresh">
|
Users do not expect a page to refresh automatically, and doing so will move focus back to the top of the page. This may create a frustrating or confusing experience. Learn more. |
meta-viewport |
[user-scalable="no"] is used in the <meta name="viewport"> element or the [maximum-scale] attribute is less than 5. |
Disabling zooming is problematic for users with low vision who rely on screen magnification to properly see the contents of a web page. Learn more. |
object-alt |
<object> elements have [alt] text |
Screen readers cannot translate non-text content. Adding alt text to <object> elements helps screen readers convey meaning to users. Learn more. |
tabindex | No element has a [tabindex] value greater than 0 |
A value greater than 0 implies an explicit navigation ordering. Although technically valid, this often creates frustrating experiences for users who rely on assistive technologies. Learn more. |
td-headers-attr | Cells in a <table> element that use the [headers] attribute only refer to other cells of that same table. |
Screen readers have features to make navigating tables easier. Ensuring <td> cells using the [headers] attribute only refer to other cells in the same table may improve the experience for screen reader users. Learn more. |
th-has-data-cells |
<th> elements and elements with [role="columnheader"/"rowheader"] have data cells they describe. |
Screen readers have features to make navigating tables easier. Ensuring table headers always refer to some set of cells may improve the experience for screen reader users. Learn more. |
valid-lang |
[lang] attributes have a valid value |
Specifying a valid BCP 47 language on elements helps ensure that text is pronounced correctly by a screen reader. Learn more. |
video-caption |
<video> elements contain a <track> element with [kind="captions"]
|
When a video provides a caption it is easier for deaf and hearing impaired users to access its information. Learn more. |
video-description |
<video> elements contain a <track> element with [kind="description"]
|
Audio descriptions provide relevant information for videos that dialogue cannot, such as facial expressions and scenes. Learn more. |
logical-tab-order | The page has a logical tab order | Tabbing through the page follows the visual layout. Users cannot focus elements that are offscreen. Learn more. |
focusable-controls | Interactive controls are keyboard focusable | Custom interactive controls are keyboard focusable and display a focus indicator. Learn more. |
interactive-element-affordance | Interactive elements indicate their purpose and state | Interactive elements, such as links and buttons, should indicate their state and be distinguishable from non-interactive elements. Learn more. |
managed-focus | The user's focus is directed to new content added to the page | If new content, such as a dialog, is added to the page, the user's focus is directed to it. Learn more. |
focus-traps | User focus is not accidentally trapped in a region | A user can tab into and out of any control or region without accidentally trapping their focus. Learn more. |
custom-controls-labels | Custom controls have associated labels | Custom interactive controls have associated labels, provided by aria-label or aria-labelledby. Learn more. |
custom-controls-roles | Custom controls have ARIA roles | Custom interactive controls have appropriate ARIA roles. Learn more. |
visual-order-follows-dom | Visual order on the page follows DOM order | DOM order matches the visual order, improving navigation for assistive technology. Learn more. |
offscreen-content-hidden | Offscreen content is hidden from assistive technology | Offscreen content is hidden with display: none or aria-hidden=true. Learn more. |
heading-levels | Headings don't skip levels | Headings are used to create an outline for the page and heading levels are not skipped. Learn more. |
use-landmarks | HTML5 landmark elements are used to improve navigation | Landmark elements (, , etc.) are used to improve the keyboard navigation of the page for assistive technology. Learn more. |
id | title | description |
---|---|---|
appcache-manifest | Avoids Application Cache | Application Cache is deprecated. Learn more. |
is-on-https | Uses HTTPS | All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. Learn more. |
uses-http2 | Uses HTTP/2 for its own resources | HTTP/2 offers many benefits over HTTP/1.1, including binary headers, multiplexing, and server push. Learn more. |
uses-passive-event-listeners | Uses passive listeners to improve scrolling performance | Consider marking your touch and wheel event listeners as passive to improve your page's scroll performance. Learn more. |
no-document-write | Avoids document.write()
|
For users on slow connections, external scripts dynamically injected via document.write() can delay page load by tens of seconds. Learn more. |
external-anchors-use-rel-noopener | Links to cross-origin destinations are unsafe | Add rel="noopener" or rel="noreferrer" to any external links to improve performance and prevent security vulnerabilities. Learn more. |
geolocation-on-start | Avoids requesting the geolocation permission on page load | Users are mistrustful of or confused by sites that request their location without context. Consider tying the request to user gestures instead. Learn more. |
doctype | Page has the HTML doctype | Specifying a doctype prevents the browser from switching to quirks-mode.Read more on the MDN Web Docs page |
no-vulnerable-libraries | Includes front-end JavaScript libraries with known security vulnerabilities | Some third-party scripts may contain known security vulnerabilities that are easily identified and exploited by attackers. Learn more. |
js-libraries | Detected JavaScript libraries | All front-end JavaScript libraries detected on the page. |
notification-on-start | Avoids requesting the notification permission on page load | Users are mistrustful of or confused by sites that request to send notifications without context. Consider tying the request to user gestures instead. Learn more. |
deprecations | Avoids deprecated APIs | Deprecated APIs will eventually be removed from the browser. Learn more. |
password-inputs-can-be-pasted-into | Allows users to paste into password fields | Preventing password pasting undermines good security policy. Learn more. |
errors-in-console | No browser errors logged to the console | Errors logged to the console indicate unresolved problems. They can come from network request failures and other browser concerns. |
image-aspect-ratio | Displays images with correct aspect ratio | Image display dimensions should match natural aspect ratio. Learn more. |
id | title | description |
---|---|---|
load-fast-enough-for-pwa | Page load is fast enough on mobile networks | A fast page load over a cellular network ensures a good mobile user experience. Learn more. |
works-offline | Current page does not respond with a 200 when offline | If you're building a Progressive Web App, consider using a service worker so that your app can work offline. Learn more. |
offline-start-url | start_url does not respond with a 200 when offline | A service worker enables your web app to be reliable in unpredictable network conditions. Learn more. |
is-on-https | Uses HTTPS | All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. Learn more. |
service-worker | Does not register a service worker that controls page and start_url | The service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. Learn more. |
installable-manifest | Web app manifest does not meet the installability requirements | Browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. Learn more. |
redirects-http | Redirects HTTP traffic to HTTPS | If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. Learn more. |
splash-screen | Is not configured for a custom splash screen | A themed splash screen ensures a high-quality experience when users launch your app from their homescreens. Learn more. |
themed-omnibox | Does not set an address-bar theme color | The browser address bar can be themed to match your site. Learn more. |
content-width | Content is sized correctly for the viewport | If the width of your app's content doesn't match the width of the viewport, your app might not be optimized for mobile screens. Learn more. |
viewport | Has a <meta name="viewport"> tag with width or initial-scale
|
Add a viewport meta tag to optimize your app for mobile screens. Learn more. |
without-javascript | Contains some content when JavaScript is not available | Your app should display some content when JavaScript is disabled, even if it's just a warning to the user that JavaScript is required to use the app. Learn more. |
apple-touch-icon | Does not provide a valid apple-touch-icon
|
For ideal appearance on iOS when users add to the home screen, define an apple-touch-icon. It must point to a non-transparent 192px (or 180px) square PNG. Learn More. |
pwa-cross-browser | Site works cross-browser | To reach the most number of users, sites should work across every major browser. Learn more. |
pwa-page-transitions | Page transitions don't feel like they block on the network | Transitions should feel snappy as you tap around, even on a slow network, a key to perceived performance. Learn more. |
pwa-each-page-has-url | Each page has a URL | Ensure individual pages are deep linkable via the URLs and that URLs are unique for the purpose of shareability on social media. Learn more. |
id | title | description |
---|---|---|
viewport | Has a <meta name="viewport"> tag with width or initial-scale
|
Add a viewport meta tag to optimize your app for mobile screens. Learn more. |
document-title | Document has a <title> element |
The title gives screen reader users an overview of the page, and search engine users rely on it heavily to determine if a page is relevant to their search. Learn more. |
meta-description | Document has a meta description | Meta descriptions may be included in search results to concisely summarize page content. Learn more. |
http-status-code | Page has successful HTTP status code | Pages with unsuccessful HTTP status codes may not be indexed properly. Learn more. |
link-text | Links have descriptive text | Descriptive link text helps search engines understand your content. Learn more. |
is-crawlable | Page isn’t blocked from indexing | Search engines are unable to include your pages in search results if they don't have permission to crawl them. Learn more. |
robots-txt | robots.txt is valid | If your robots.txt file is malformed, crawlers may not be able to understand how you want your website to be crawled or indexed. |
image-alt | Image elements have [alt] attributes |
Informative elements should aim for short, descriptive alternate text. Decorative elements can be ignored with an empty alt attribute. Learn more. |
hreflang | Document has a valid hreflang
|
hreflang links tell search engines what version of a page they should list in search results for a given language or region. Learn more. |
canonical | Document has a valid rel=canonical
|
Canonical links suggest which URL to show in search results. Learn more. |
font-size | Document uses legible font sizes | Font sizes less than 12px are too small to be legible and require mobile visitors to “pinch to zoom” in order to read. Strive to have >60% of page text ≥12px. Learn more. |
plugins | Document avoids plugins | Search engines can't index plugin content, and many devices restrict plugins or don't support them. Learn more. |
tap-targets | Tap targets are sized appropriately | Interactive elements like buttons and links should be large enough (48x48px), and have enough space around them, to be easy enough to tap without overlapping onto other elements. Learn more. |
structured-data | Structured data is valid | Run the Structured Data Testing Tool and the Structured Data Linter to validate structured data. Learn more. |