The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.
This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.
Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
This is a reland of 58040a832bb68a52529638518de36be17c65547f
The failing aXe tests were removed and will be added again after
invesigation
Original change's description:
> DevTools: Make Preview Pane Accessible
>
> The preview pane previously lacked keyboard controls for navigating
> through the JSON and XML views, the Font view unnecessarily read out the
> content of the view (the alphabet) when accessed via screen reader, and
> the Image view did not allow a screen reader user to access the size and
> mime type of the image.
>
> This patch fixes these issues by making the JSON and XML treeOutlines
> selectable so they can be accessed via keyboard and by displaying
> keyboard focus within the treeOutline. In the Font view, the element
> containing the sample text is marked so that a screen reader will not
> read the contents, but rather will read the source url of the font. In
> the Image view, a tab stop was moved from a parent element to the image
> itself and a label was added that reads the source url of the image.
>
> JSON view before: https://imgur.com/BWczsAL
> JSON view after, without keyboard focus: (same as before)
> JSON view after, with keyboard focus: https://imgur.com/gD0rNSB
>
> XML view before: https://imgur.com/Ec9b5kf
> XML view after, without focus: https://imgur.com/NEqUgpt
> XML view after, with focus: https://imgur.com/0csIpQ3
>
> Change-Id: Id8bacdc593a5b562069fddb70452902ebad934e0
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1551384
> Commit-Queue: Amanda Baker <ambake@microsoft.com>
> Reviewed-by: Erik Luo <luoe@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#663263}
Change-Id: If544cc7a83d031c42cb538f6e89b9df9d3ec1dc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1633989
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Amanda Baker <ambake@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#666949}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ffc8de5717812a6e5803c9f005a4159a58ff0824
The preview pane previously lacked keyboard controls for navigating
through the JSON and XML views, the Font view unnecessarily read out the
content of the view (the alphabet) when accessed via screen reader, and
the Image view did not allow a screen reader user to access the size and
mime type of the image.
This patch fixes these issues by making the JSON and XML treeOutlines
selectable so they can be accessed via keyboard and by displaying
keyboard focus within the treeOutline. In the Font view, the element
containing the sample text is marked so that a screen reader will not
read the contents, but rather will read the source url of the font. In
the Image view, a tab stop was moved from a parent element to the image
itself and a label was added that reads the source url of the image.
JSON view before: https://imgur.com/BWczsAL
JSON view after, without keyboard focus: (same as before)
JSON view after, with keyboard focus: https://imgur.com/gD0rNSB
XML view before: https://imgur.com/Ec9b5kf
XML view after, without focus: https://imgur.com/NEqUgpt
XML view after, with focus: https://imgur.com/0csIpQ3
Change-Id: Id8bacdc593a5b562069fddb70452902ebad934e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1551384
Commit-Queue: Amanda Baker <ambake@microsoft.com>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#663263}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 58040a832bb68a52529638518de36be17c65547f
All ObjectPropertiesSections call 'hideOverflow()', to avoid overflow
in the OPS's title (to adress crbugs 571759,571767).
However, hideOverflow does not hide overflow due to children, which
causes horizontal scrolling in Console. This CL makes hide overflow
in properties for all OPS except JSONView.
Screenshot: https://imgur.com/a/x51xJNJ
Bug: none
Change-Id: Ie78f48cd873fd1d61b27c17e76683a4f7031aee8
Reviewed-on: https://chromium-review.googlesource.com/1162913
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#580726}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ae67481a95eded5fc4e09cb4befebc71a4443ef4