Commit 841f3ad0 authored by John Delaney's avatar John Delaney Committed by Commit Bot

Add aria-label to small form quiet webview interstitial icon

Adds an aria-label to the interstitial icon when no text is being
rendered. This reuses the interstitial heading data as the label.

For non-small form frames, no aria-label is needed because the
interstitial heading already describes the icon. However, when no text
is rendered there is currently nothing that can be picked up by screen
readers.

Bug: 1095754
Change-Id: I51062e1028c74b61bc3e80922d05ad021f0e36e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2249082
Commit-Queue: John Delaney <johnidel@chromium.org>
Reviewed-by: default avatarCarlos IL <carlosil@chromium.org>
Reviewed-by: default avatarEdward Jung (EMEA) <edwardjung@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779624}
parent d0b82558
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<body id="body"> <body id="body">
<div class="interstitial-wrapper"> <div class="interstitial-wrapper">
<div id="main-content"> <div id="main-content">
<div class="icon"></div> <div id="icon" class="icon"></div>
<div id="main-message"> <div id="main-message">
<h1> <h1>
<span>$i18n{heading}</span> <span>$i18n{heading}</span>
......
...@@ -15,6 +15,9 @@ function onResize() { ...@@ -15,6 +15,9 @@ function onResize() {
if (window.matchMedia(mediaQuery).matches) { if (window.matchMedia(mediaQuery).matches) {
const hiddenDetails = $('details').classList.add(HIDDEN_CLASS); const hiddenDetails = $('details').classList.add(HIDDEN_CLASS);
$('main-content').classList.remove(HIDDEN_CLASS); $('main-content').classList.remove(HIDDEN_CLASS);
$('icon').setAttribute('aria-label', loadTimeData.getString('heading'));
} else {
$('icon').removeAttribute('aria-label');
} }
} }
......
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