Commit 51af9294 authored by Meredith Lane's avatar Meredith Lane Committed by Commit Bot

[ReaderMode] Move settings close button to end of DOM order

Previously, the close button was the first thing to receive focus.
WAI-ARIA dictates that for a modal dialog, focus should move to the
first focusable control in the dialog, in this case the font selector.
The user can still close at any time by using the Esc key.

Note that this causes no visual changes; it only changes focus order.

Bug: 1015200
Change-Id: Ieee530095dc90a7befc30761ddcb45e8935a8121
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2114771
Commit-Queue: Meredith Lane <meredithl@chromium.org>
Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752696}
parent 44a02af8
......@@ -26,10 +26,6 @@ found in the LICENSE file.
<dialog id="settings-dialog">
<div id="settings-header">
<h2>Customize appearance</h2>
<button id="close-settings-button" type="button" aria-label="Close"
tabindex=0>
<i class="material-icons">close</i>
</button>
</div>
<div id="settings-fields">
<div class="setting">
......@@ -96,6 +92,10 @@ found in the LICENSE file.
</div>
</div>
</div>
<button id="close-settings-button" type="button" aria-label="Close"
tabindex=0>
<i class="material-icons">close</i>
</button>
</dialog>
</div>
<article>
......
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