Closes #7720:
- 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!)
This commit is contained in:
parent
e1187ebf31
commit
c383d4225e
|
@ -31,7 +31,7 @@
|
||||||
<org.mozilla.fenix.trackingprotection.SwitchWithDescription
|
<org.mozilla.fenix.trackingprotection.SwitchWithDescription
|
||||||
android:id="@+id/trackingProtectionSwitch"
|
android:id="@+id/trackingProtectionSwitch"
|
||||||
android:layout_width="match_parent"
|
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:minHeight="@dimen/tracking_protection_item_height"
|
||||||
android:text="@string/preference_enhanced_tracking_protection"
|
android:text="@string/preference_enhanced_tracking_protection"
|
||||||
app:layout_constraintBottom_toTopOf="@id/blocking_header"
|
app:layout_constraintBottom_toTopOf="@id/blocking_header"
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
android:layout_marginStart="48dp"
|
android:layout_marginStart="48dp"
|
||||||
android:layout_marginEnd="64dp"
|
android:layout_marginEnd="64dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
android:textAppearance="@style/ListItemTextStyle"
|
android:textAppearance="@style/ListItemTextStyle"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/trackingProtectionCategoryItemDescription"
|
app:layout_constraintBottom_toTopOf="@+id/trackingProtectionCategoryItemDescription"
|
||||||
|
@ -31,6 +33,8 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
|
android:importantForAccessibility="no"
|
||||||
android:textColor="?attr/secondaryText"
|
android:textColor="?attr/secondaryText"
|
||||||
android:layout_marginBottom="4dp"
|
android:layout_marginBottom="4dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
@ -43,12 +47,13 @@
|
||||||
|
|
||||||
<Switch
|
<Switch
|
||||||
android:id="@+id/switch_widget"
|
android:id="@+id/switch_widget"
|
||||||
|
style="@style/QuickSettingsText.Icon"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/library_item_icon_margin_horizontal"
|
android:textOff="@string/etp_switch_off"
|
||||||
android:layout_marginEnd="@dimen/library_item_icon_margin_horizontal"
|
android:textOn="@string/etp_switch_on"
|
||||||
app:drawableStartCompat="@drawable/ic_tracking_protection"
|
app:drawableStartCompat="@drawable/ic_tracking_protection"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/trackingProtectionCategoryItemDescription"
|
app:layout_constraintBottom_toBottomOf="@id/trackingProtectionCategoryItemDescription"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@id/trackingProtectionCategoryTitle" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -1045,6 +1045,10 @@
|
||||||
<string name="etp_panel_on">Protections are ON for this site</string>
|
<string name="etp_panel_on">Protections are ON for this site</string>
|
||||||
<!-- Enhanced Tracking Protection message that protection is currently off for this site -->
|
<!-- Enhanced Tracking Protection message that protection is currently off for this site -->
|
||||||
<string name="etp_panel_off">Protections are OFF for this site</string>
|
<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 -->
|
<!-- 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>
|
<string name="enhanced_tracking_protection_exceptions">Enhanced Tracking Protection is off for these websites</string>
|
||||||
<!-- Content description (not visible, for screen readers etc.): Navigate
|
<!-- Content description (not visible, for screen readers etc.): Navigate
|
||||||
|
|
Loading…
Reference in New Issue
Block a user