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 @@ ...@@ -410,8 +410,7 @@
$i18n{personalizeGoogleServicesTitle} $i18n{personalizeGoogleServicesTitle}
</div> </div>
<paper-icon-button-light actionable class="icon-external"> <paper-icon-button-light actionable class="icon-external">
<button aria-label="$i18n{personalizeGoogleServicesTitle}"> <button></button>
</button>
</paper-icon-button-light> </paper-icon-button-light>
</a> </a>
...@@ -422,7 +421,7 @@ ...@@ -422,7 +421,7 @@
$i18n{manageSyncedDataTitle} $i18n{manageSyncedDataTitle}
</div> </div>
<paper-icon-button-light actionable class="icon-external"> <paper-icon-button-light actionable class="icon-external">
<button aria-label="$i18n{manageSyncedDataTitle}"></button> <button></button>
</paper-icon-button-light> </paper-icon-button-light>
</a> </a>
...@@ -452,20 +451,29 @@ ...@@ -452,20 +451,29 @@
on-paper-radio-group-changed= on-paper-radio-group-changed=
"onEncryptionRadioSelectionChanged_"> "onEncryptionRadioSelectionChanged_">
<cr-radio-button name="encrypt-with-google" <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} $i18n{encryptWithGoogleCredentialsLabel}
</cr-radio-button> </cr-radio-button>
<cr-radio-button name="encrypt-with-passphrase" <template is="dom-if" if="[[syncPrefs.fullEncryptionBody]]">
class="list-item" disabled="[[syncPrefs.encryptAllData]]"> <cr-radio-button name="encrypt-with-passphrase"
<template is="dom-if" if="[[syncPrefs.fullEncryptionBody]]"> class="list-item" disabled="[[syncPrefs.encryptAllData]]"
<span>[[syncPrefs.fullEncryptionBody]]</span> aria-labelledby="fullEncryptionBody">
</template> <span id="fullEncryptionBody">
<template is="dom-if" if="[[!syncPrefs.fullEncryptionBody]]"> [[syncPrefs.fullEncryptionBody]]
<span on-click="onLearnMoreTap_"> </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} $i18nRaw{encryptWithSyncPassphraseLabel}
</span> </span>
</template> </cr-radio-button>
</cr-radio-button> </template>
</paper-radio-group> </paper-radio-group>
</div> </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