DevTools: Service Worker URLs are not read by screen readers

When a screen reader user is tabbing through the registered
service workers, the screen reader fails to announce the origins
from which the service workers are registered. By default, the
reader just announces "Update", as the Update button is the first
focusable element within each individual Service Worker view.

This change adds a new API to ReportView.Section. Because Section
is a generic control which may not always follow this paradigm,
the new API seems to be the best choice for how to implement. The
API is opt-in by call sites as demonstrated by this use of it.
The API sets the role="group" on the containing element, and
applies a label to the containing element. Upon focus entering the
containing element, the full title is read aloud.

"After" screencap:

Bug: 963183
Change-Id: I5ef631d24d9f2df9f610a21c84fd5a9d6ae26b48
Reviewed-by: Lorne Mitchell <>
Commit-Queue: Robert Paveza <>
Cr-Original-Commit-Position: refs/heads/master@{#706688}
Cr-Mirrored-Commit: e1961cc7bcaddd8cc0fc6cf86bfea5ff1998c989
3 files changed
tree: 6da810aa2fa2881b91417a06629c5b827eeca36c
  1. docs/
  2. front_end/
  3. scripts/
  4. test/
  5. .clang-format
  6. .eslintignore
  7. .eslintrc.js
  8. .gitignore
  9. .npmignore
  10. .style.yapf
  12. htaccess
  13. karma.conf.js
  15. OWNERS
  16. package.json
  18. protocol.json
  20. tsconfig.json

Chrome DevTools frontend

NPM package

The client-side of the Chrome DevTools, including all JS & CSS to run the DevTools webapp.

It is available on NPM as the chrome-devtools-frontend package. It's not currently available via CJS or ES2015 modules, so consuming this package in other tools may require some effort.

Package versioning

The version number of the npm package (e.g. 1.0.373466) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.

Source code

The frontend is available through a git subtree mirror on, with a regularly updating GitHub mirror at The codebase's true location is in third_party/blink/renderer/devtools/ in Chromium's git repo.

Getting Started

  1. Clone the repo
  2. Go to repo root and run: npm start
    • This launches Chrome Canary and starts the dev server with 1 command
  3. Go to http://localhost:9222#custom=true&experiments=true

Power user tips:

You can customize the port for the dev server: e.g. PORT=8888 npm start.

You can also launch chrome and start the server separately:

  • npm run chrome
  • npm run server

When you start Chrome separately, you can pass extra args to Chrome:

npm run chrome --

(e.g. this launches Hacker News on startup)

If you want to reset your development profile for Chrome, pass in “--reset-profile”:

npm start -- --reset-profile


npm run chrome -- --reset-profile


Useful Commands

Simpler npm commands w/ dtrun

If you want to run these npm commands anywhere in the chromium repo (e.g. in chromium/src), you'll want to setup our dtrun CLI helper.

One-time setup:

npm run setup-dtrun

Now, you can use any of the following commands by simply doing: dtrun test.

In addition, you no longer need to pass double dashes (e.g. --) before you pass in the flags. So you can do: dtrun test -d inspector/test.html.

npm run format

Formats your code using clang-format

npm run format-py

Formats your Python code using yapf

Note: Yapf is a command line tool. You will have to install this manually, either from PyPi through pip install yapf or if you want to enable multiprocessing in Python 2.7, pip install futures

npm test

Builds devtools and runs all inspector/devtools web tests.

Note: If you're using a full chromium checkout and compiled content shell in out/Release, then npm test uses that. Otherwise, with only a front-end checkout (i.e. cloning from GitHub), then npm test will fetch a previously compiled content shell from the cloud (and cache it for future test runs).

npm test basics

# run specific tests
npm test -- inspector/sources inspector/console

# debug a specific test. Any one of:
npm run debug-test inspector/cookie-resource-match.html
npm test -- --debug-devtools inspector/cookie-resource-match.html
npm test -- -d inspector/cookie-resource-match.html

# pass in additional flags to the test harness
npm test -- -f --child-processes=16

# ...for example, use a higher test timeout
npm test -- --time-out-ms=6000000 <test_path>

Tip: Learn about the test harness flags


# If you're using a full chromium checkout and have a compiled content shell,
# this will fetch a pre-compiled content shell. This is useful if you
# haven't compiled your content shell recently
npm test -- --fetch-content-shell


# If you're using a build sub-directory that's not out/Release,
# such as out/Default, then use --target=SUB_DIRECTORY_NAME
npm test -- --target=Default


Getting in touch


The tests are run through Karma.

python scripts/

You can also specify with which Chrome binary to run tests by setting the chrome-binary variable.

python scripts/ --chrome-binary=/path/to/chromium/build/chromium