Commit 652922aa authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[unified-consent] Fix a11y issues on syncSetup page

 - Nested controls are removed:
 The aria attributes of buttons inside <a> links are removed,
 so they won't be read twice by a screen reader.

 - Missing aria labels are added to radio buttons.

Bug: 853996
Change-Id: I9e009425c4d6cc0c03135856135fb830d96cf989
Reviewed-on: https://chromium-review.googlesource.com/1206810
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Reviewed-by: default avatarScott Chen <scottchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589371}
parent b8fa1ab3
......@@ -410,8 +410,7 @@
$i18n{personalizeGoogleServicesTitle}
</div>
<paper-icon-button-light actionable class="icon-external">
<button aria-label="$i18n{personalizeGoogleServicesTitle}">
</button>
<button></button>
</paper-icon-button-light>
</a>
......@@ -422,7 +421,7 @@
$i18n{manageSyncedDataTitle}
</div>
<paper-icon-button-light actionable class="icon-external">
<button aria-label="$i18n{manageSyncedDataTitle}"></button>
<button></button>
</paper-icon-button-light>
</a>
......@@ -452,20 +451,29 @@
on-paper-radio-group-changed=
"onEncryptionRadioSelectionChanged_">
<cr-radio-button name="encrypt-with-google"
class="list-item" disabled="[[syncPrefs.encryptAllData]]">
class="list-item" disabled="[[syncPrefs.encryptAllData]]"
aria-label="$i18n{encryptWithGoogleCredentialsLabel}">
$i18n{encryptWithGoogleCredentialsLabel}
</cr-radio-button>
<cr-radio-button name="encrypt-with-passphrase"
class="list-item" disabled="[[syncPrefs.encryptAllData]]">
<template is="dom-if" if="[[syncPrefs.fullEncryptionBody]]">
<span>[[syncPrefs.fullEncryptionBody]]</span>
</template>
<template is="dom-if" if="[[!syncPrefs.fullEncryptionBody]]">
<span on-click="onLearnMoreTap_">
<template is="dom-if" if="[[syncPrefs.fullEncryptionBody]]">
<cr-radio-button name="encrypt-with-passphrase"
class="list-item" disabled="[[syncPrefs.encryptAllData]]"
aria-labelledby="fullEncryptionBody">
<span id="fullEncryptionBody">
[[syncPrefs.fullEncryptionBody]]
</span>
</cr-radio-button>
</template>
<template is="dom-if" if="[[!syncPrefs.fullEncryptionBody]]">
<cr-radio-button name="encrypt-with-passphrase"
class="list-item" disabled="[[syncPrefs.encryptAllData]]"
aria-labelledby="encryptWithSyncPassphraseLabel">
<span id="encryptWithSyncPassphraseLabel"
on-click="onLearnMoreTap_">
$i18nRaw{encryptWithSyncPassphraseLabel}
</span>
</template>
</cr-radio-button>
</cr-radio-button>
</template>
</paper-radio-group>
</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