Commit 6a8b7910 authored by Rob Paveza's avatar Rob Paveza Committed by Commit Bot

DevTools: Network preview for HTML frame-title rule violation

Accessibility Insights identifies an issue in which the iframe
which contains the HTML preview of network requests does not have
a title, which could present a difficulty for assistive technology.
Because, particularly among HTML content, it's highly likely that
the HTML content is going to be presented on the web application,
and the preview itself is not intended to be interactive, this
change adds a role="presentation" attribute. This is intended to
make the element semantically meaningless to assistive tech [1].

[1] https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_presentation_role

Bug: 963183
Change-Id: I0f0fd02b13595f4787ebf0919abe8cf5a721884e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841940Reviewed-by: default avatarLorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#703997}
parent 45d3378e
...@@ -65,6 +65,7 @@ Network.RequestHTMLView = class extends UI.VBox { ...@@ -65,6 +65,7 @@ Network.RequestHTMLView = class extends UI.VBox {
iframe.setAttribute('sandbox', ''); // Forbid to run JavaScript and set unique origin. iframe.setAttribute('sandbox', ''); // Forbid to run JavaScript and set unique origin.
iframe.setAttribute('src', this._dataURL); iframe.setAttribute('src', this._dataURL);
iframe.setAttribute('tabIndex', -1); iframe.setAttribute('tabIndex', -1);
UI.ARIAUtils.markAsPresentation(iframe);
this.contentElement.appendChild(iframe); this.contentElement.appendChild(iframe);
} }
}; };
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