Commit 409c2855 authored by Brandon Goddard's avatar Brandon Goddard Committed by Commit Bot

DevTools: Minor A11y change to Network DataGrid display

For users who don't use screen readers, the icon in the data grid
communicates information about the type of document in the data
grid. However, this icon lacked the document type information. This
change adds the name of the type to the icon so it can be read via
a screen reader.

Bug: 963183
Change-Id: I6b3e717b270467327856c502e6ba47329386b31a

https: //imgur.com/F0HyQ1L
https: //imgur.com/xo1kz07
Change-Id: I6b3e717b270467327856c502e6ba47329386b31a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1644380Reviewed-by: default avatarJoel Einbinder <einbinder@chromium.org>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#666520}
parent c86e6235
......@@ -796,12 +796,14 @@ Network.NetworkRequestNode = class extends Network.NetworkNode {
let iconElement;
if (this._request.resourceType() === Common.resourceTypes.Image) {
const previewImage = createElementWithClass('img', 'image-network-icon-preview');
UI.ARIAUtils.setAccessibleName(previewImage, this._request.resourceType().title());
this._request.populateImageSource(previewImage);
iconElement = createElementWithClass('div', 'icon');
iconElement.appendChild(previewImage);
} else {
iconElement = createElementWithClass('img', 'icon');
UI.ARIAUtils.setAccessibleName(iconElement, this._request.resourceType().title());
}
iconElement.classList.add(this._request.resourceType().name());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment