Commit df646211 authored by Regan Hsu's avatar Regan Hsu Committed by Chromium LUCI CQ

[CrOS PhoneHub] A11y fixes to Multidevice rows.

* Disconnect button is now a single chromevox stop.
* Feature title and labels are no longer chromevox stops. "Learn more"
  link is still a tab stop though, because it's actionable.
* Tooltip icon now announces tooltip content.

Fixed: 1163773
Bug: 1106937
Change-Id: I7e97743d53ccf55128e18f5210ac35350ac3b0bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2618521
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842886}
parent d8d6033f
...@@ -45,10 +45,11 @@ ...@@ -45,10 +45,11 @@
feature, pageContentData, subpageRoute)]]" feature, pageContentData, subpageRoute)]]"
on-click="handleItemClick_"> on-click="handleItemClick_">
<slot name="icon"> <slot name="icon">
<iron-icon id="feature-icon" icon="[[getIconName(feature)]]"> <iron-icon id="feature-icon" icon="[[getIconName(feature)]]"
aria-hidden="true">
</iron-icon> </iron-icon>
</slot> </slot>
<div id="item-text-container" class="middle"> <div id="item-text-container" class="middle" aria-hidden="true">
<div id="featureName">[[getFeatureName(feature)]]</div> <div id="featureName">[[getFeatureName(feature)]]</div>
<slot name="feature-summary"> <slot name="feature-summary">
<settings-localized-link <settings-localized-link
...@@ -68,8 +69,11 @@ ...@@ -68,8 +69,11 @@
</cr-icon-button> </cr-icon-button>
</template> </template>
<template is="dom-if" if="[[infoTooltip]]" restamp> <template is="dom-if" if="[[infoTooltip]]" restamp>
<iron-icon id="help-icon" icon="cr:help-outline"></iron-icon> <iron-icon id="help-icon" tabindex="0" icon="cr:help-outline"
<paper-tooltip for="help-icon" position="top" fit-to-visible-bounds> aria-labelledby="tooltip">
</iron-icon>
<paper-tooltip id="tooltip" for="help-icon" position="top"
aria-hidden="true" fit-to-visible-bounds>
[[infoTooltip]] [[infoTooltip]]
</paper-tooltip> </paper-tooltip>
</template> </template>
...@@ -86,12 +90,19 @@ ...@@ -86,12 +90,19 @@
restamp> restamp>
<cr-policy-indicator indicator-type="userPolicy"></cr-policy-indicator> <cr-policy-indicator indicator-type="userPolicy"></cr-policy-indicator>
</template> </template>
<div class="margin-matches-padding"> <div class="margin-matches-padding" aria-labelledby="featureName"
aria-describedby="featureSecondary">
<!-- The aria-labelledby and aria-describedby are used by custom slotted
content, without which ChromeVox will not announce the #featureName
or #featureSummary. Note that the default slotted content still needs
their own aria-labelledby and aria-describedby attributes. -->
<slot name="feature-controller"> <slot name="feature-controller">
<!-- This settings-multidevice-feature-toggle is the default <!-- This settings-multidevice-feature-toggle is the default
controller. If an element with slot="feature-controller" is attached, controller. If an element with slot="feature-controller" is attached,
it will replace this one. --> it will replace this one. -->
<settings-multidevice-feature-toggle <settings-multidevice-feature-toggle
aria-labelledby="featureName"
aria-describedby="featureSecondary"
feature="[[feature]]" feature="[[feature]]"
page-content-data="[[pageContentData]]"> page-content-data="[[pageContentData]]">
</settings-multidevice-feature-toggle> </settings-multidevice-feature-toggle>
......
...@@ -152,17 +152,18 @@ ...@@ -152,17 +152,18 @@
</div> </div>
</template> </template>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div id="forget-device-label" class="start"> <div id="forgetDeviceLabel" class="start" aria-hidden="true">
$i18n{multideviceForgetDevice} $i18n{multideviceForgetDevice}
<div class="secondary"> <div id="forgetDeviceSummary" class="secondary" aria-hidden="true">
$i18n{multideviceForgetDeviceSummary} $i18n{multideviceForgetDeviceSummary}
</div>
</div> </div>
<cr-button on-click="handleForgetDeviceClick_" </div>
<cr-button on-click="handleForgetDeviceClick_"
aria-labelledby="forgetDeviceLabel" aria-labelledby="forgetDeviceLabel"
aria-describedby="forgetDeviceSummary"
deep-link-focus-id$="[[Setting.kForgetPhone]]"> deep-link-focus-id$="[[Setting.kForgetPhone]]">
$i18n{multideviceForgetDeviceDisconnect} $i18n{multideviceForgetDeviceDisconnect}
</cr-button> </cr-button>
</div> </div>
<cr-dialog id="forgetDeviceDialog"> <cr-dialog id="forgetDeviceDialog">
<div slot="title">$i18n{multideviceForgetDevice}</div> <div slot="title">$i18n{multideviceForgetDevice}</div>
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
subpage-route-url-search-params= subpage-route-url-search-params=
"[[getTetherNetworkUrlSearchParams_()]]"> "[[getTetherNetworkUrlSearchParams_()]]">
<network-icon slot="icon" <network-icon slot="icon"
aria-hidden="true"
show-technology-badge="[[showTechnologyBadge_]]" show-technology-badge="[[showTechnologyBadge_]]"
network-state="[[activeNetworkState_]]" network-state="[[activeNetworkState_]]"
device-state="[[deviceState_]]"> device-state="[[deviceState_]]">
......
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