Commit 9936c268 authored by Demetrios Papadopoulos's avatar Demetrios Papadopoulos Committed by Commit Bot

PrintPreview: Fix "More options" a11y behavior to not read label twice.

Specifically:
 - Pass "More options" label as a <slot> to cr-expand-button.
 - Change md-select's aria-label to aria-labeledby

This results in better screen reader (VoiceOver) behavior where the
label is not read twice when navigating with Ctrl+Alt+RightArrow.

Bug: 1055829
Change-Id: I31dadd2e13ca8ce50e75050f0f580b06183bcfa0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2510329
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Auto-Submit: dpapad <dpapad@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823422}
parent dd60a7b7
......@@ -17,7 +17,9 @@
}
:host cr-expand-button {
flex: 1;
margin-inline-end: calc(var(--print-preview-sidebar-margin) + 6px);
margin-inline-start: var(--print-preview-sidebar-margin);
--cr-expand-button-size: 28px;
}
......@@ -25,20 +27,13 @@
display: none;
}
#label {
color: var(--cr-primary-text-color);
flex: 1;
margin-inline-start: var(--print-preview-sidebar-margin);
text-align: start;
}
:host([disabled]) #label {
opacity: var(--cr-disabled-opacity);
}
</style>
<div on-click="toggleExpandButton_" actionable>
<span id="label">$i18n{moreOptionsLabel}</span>
<cr-expand-button alt="$i18n{moreOptionsLabel}"
expanded="{{settingsExpandedByUser}}" disabled="[[disabled]]">
<div id="label">$i18n{moreOptionsLabel}</div>
</cr-expand-button>
</div>
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