Fixes #1186: Made quick actions sheet's handle larger.
It now takes up the entire horizontal space and all the vertical space until the buttons. This gives a bigger touch target both for typical users and TalkBack users when they use explore-by-touch. Also changed content description. The content description should not include semantic names like "handle". The screen reader already knows it's a button and describes it as such. Same thing with "sheet".master
parent
c415abffca
commit
c807f84b98
|
@ -17,7 +17,6 @@ import org.mozilla.fenix.R
|
|||
import android.animation.ValueAnimator
|
||||
import android.view.accessibility.AccessibilityManager
|
||||
import androidx.interpolator.view.animation.FastOutSlowInInterpolator
|
||||
import org.mozilla.fenix.ext.increaseTapArea
|
||||
import org.mozilla.fenix.utils.Settings
|
||||
|
||||
class QuickActionSheet @JvmOverloads constructor(
|
||||
|
@ -53,7 +52,6 @@ class QuickActionSheet @JvmOverloads constructor(
|
|||
return
|
||||
}
|
||||
|
||||
handle.increaseTapArea(grabHandleIncreasedTapArea)
|
||||
handle.setOnClickListener {
|
||||
bounceSheet(quickActionSheetBehavior)
|
||||
}
|
||||
|
@ -90,7 +88,6 @@ class QuickActionSheet @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
companion object {
|
||||
const val grabHandleIncreasedTapArea = 50
|
||||
const val demoBounceAnimationLength = 600L
|
||||
const val bounceAnimationLength = 400L
|
||||
const val demoBounceAnimationPeekHeightMultiplier = 4.5f
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<shape
|
||||
android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="2dp"/>
|
||||
<size android:height="2dp" android:width="24dp" />
|
||||
<solid android:color="#2915141A" />
|
||||
</shape>
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:insetBottom="10dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="2dp"/>
|
||||
<size android:height="2dp" android:width="24dp" />
|
||||
<solid android:color="#5215141A" />
|
||||
</shape>
|
||||
</inset>
|
|
@ -14,12 +14,10 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatImageButton
|
||||
android:id="@+id/quick_action_sheet_handle"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12dp"
|
||||
android:contentDescription="@string/quick_action_sheet_handle"
|
||||
android:background="?attr/quickActionPullTabColor"
|
||||
android:background="@null"
|
||||
android:src="@drawable/ic_drawer_pull_tab"/>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
<!-- Content description (not visible, for screen readers etc.): Quick action sheet-->
|
||||
<string name="quick_action_sheet">Quick action sheet</string>
|
||||
<!-- Content description (not visible, for screen readers etc.): Quick action sheet handle -->
|
||||
<string name="quick_action_sheet_handle">Quick action sheet handle</string>
|
||||
<string name="quick_action_sheet_handle">Quick actions</string>
|
||||
|
||||
<!-- Library -->
|
||||
<!-- Option in Library to open Sessions page -->
|
||||
|
|
Loading…
Reference in New Issue