1
0
Fork 0
- Increased atp switch size to be consistent with `dimen/tracking_protection_item_height`(48dp).
- Cut out redundant traversal of TextViews in SwitchWithTraversal as per https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md
- Reuse `QuickSettingsText.Icon` style on the switch component to be consistent with other items in the component_tracking_protection_panel.xml
- Added new string resources for textOff and textOn state to get appropriate screen reader description (unsure of the translation/localisation process here!)
master
asavill 2020-03-23 16:19:20 +00:00 committed by Emily Kager
parent e1187ebf31
commit c383d4225e
3 changed files with 14 additions and 5 deletions

View File

@ -31,7 +31,7 @@
<org.mozilla.fenix.trackingprotection.SwitchWithDescription
android:id="@+id/trackingProtectionSwitch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/tracking_protection_item_height"
android:minHeight="@dimen/tracking_protection_item_height"
android:text="@string/preference_enhanced_tracking_protection"
app:layout_constraintBottom_toTopOf="@id/blocking_header"

View File

@ -16,6 +16,8 @@
android:layout_marginStart="48dp"
android:layout_marginEnd="64dp"
android:clickable="false"
android:focusable="false"
android:importantForAccessibility="no"
android:textAppearance="@style/ListItemTextStyle"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/trackingProtectionCategoryItemDescription"
@ -31,6 +33,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
android:importantForAccessibility="no"
android:textColor="?attr/secondaryText"
android:layout_marginBottom="4dp"
app:layout_constraintBottom_toBottomOf="parent"
@ -43,12 +47,13 @@
<Switch
android:id="@+id/switch_widget"
style="@style/QuickSettingsText.Icon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/library_item_icon_margin_horizontal"
android:layout_marginEnd="@dimen/library_item_icon_margin_horizontal"
android:layout_height="match_parent"
android:textOff="@string/etp_switch_off"
android:textOn="@string/etp_switch_on"
app:drawableStartCompat="@drawable/ic_tracking_protection"
app:layout_constraintBottom_toBottomOf="@id/trackingProtectionCategoryItemDescription"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/trackingProtectionCategoryTitle" />
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1045,6 +1045,10 @@
<string name="etp_panel_on">Protections are ON for this site</string>
<!-- Enhanced Tracking Protection message that protection is currently off for this site -->
<string name="etp_panel_off">Protections are OFF for this site</string>
<!-- Text to announce when Enhanced Tracking Protection switch is ON -->
<string name="etp_switch_on">Enhanced Tracking Protection On</string>
<!-- Text to announce when Enhanced Tracking Protection switch is OFF -->
<string name="etp_switch_off">Enhanced Tracking Protection Off</string>
<!-- Header for exceptions list for which sites enhanced tracking protection is always off -->
<string name="enhanced_tracking_protection_exceptions">Enhanced Tracking Protection is off for these websites</string>
<!-- Content description (not visible, for screen readers etc.): Navigate