Commit fd7bf29b authored by Meredith Lane's avatar Meredith Lane Committed by Commit Bot

[ReaderMode] Fix theme selection announcements.

This change removes the label for each theme option, and instead uses
aria-label option element itself. As the label is not visually rendered
on the page, it is safe to be removed. This also fixes the issue of the
label being announced separately to the control itself when navigating
incrementally with VoiceOver.

Note: This change has no visual change, only affects screenreader
announcements.

AX-Relnotes:N/A

Fixed: 1087934
Change-Id: Ia7d063a03158ad8ca2f51a84b9535c427f7868cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2306138
Commit-Queue: Meredith Lane <meredithl@chromium.org>
Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791153}
parent 48e1c5c5
...@@ -47,30 +47,18 @@ found in the LICENSE file. ...@@ -47,30 +47,18 @@ found in the LICENSE file.
</legend> </legend>
<ul> <ul>
<li class="theme-option"> <li class="theme-option">
<label id="theme-option-light-label" class="screen-reader-only">
light
</label>
<input type="radio" name="theme" value="light" <input type="radio" name="theme" value="light"
aria-labelledby="theme-option-light-label" aria-label="light" id="theme-option-light" class="light" checked>
id="theme-option-light" class="light" checked>
<div class="checkmark"><i class="material-icons" aria-hidden="true">&#xE86c</i></div> <div class="checkmark"><i class="material-icons" aria-hidden="true">&#xE86c</i></div>
</li> </li>
<li class="theme-option"> <li class="theme-option">
<label id="theme-option-sepia-label" class="screen-reader-only">
sepia
</label>
<input type="radio" name="theme" value="sepia" <input type="radio" name="theme" value="sepia"
aria-labelledby="theme-option-sepia-label" aria-label="sepia" id="theme-option-sepia" class="sepia">
id="theme-option-sepia" class="sepia">
<div class="checkmark"><i class="material-icons" aria-hidden="true">&#xE86c</i></div> <div class="checkmark"><i class="material-icons" aria-hidden="true">&#xE86c</i></div>
</li> </li>
<li class="theme-option"> <li class="theme-option">
<label id="theme-option-dark-label" class="screen-reader-only">
dark
</label>
<input type="radio" name="theme" value="dark" <input type="radio" name="theme" value="dark"
aria-labelledby="theme-option-dark-label" aria-label="dark" id="theme-option-dark" class="dark">
id="theme-option-dark" class="dark">
<div class="checkmark"><i class="material-icons" aria-hidden="true">&#xE86c</i></div> <div class="checkmark"><i class="material-icons" aria-hidden="true">&#xE86c</i></div>
</li> </li>
</ul> </ul>
......
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