Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13c67276 authored by Shamali P's avatar Shamali P
Browse files

Set accessibility pane title for right pane on updating content.

This will let users know that content appeared on right when they
selected an option on left.

Note: This is announced _only_ when content changes.

Bug: 324073588
Test: Manual with talkback
Flag: N/A
Change-Id: Icec3242d8f250f6d19e082a39927165c7b8fc86a
parent c2f73d90
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@
                        android:clipToOutline="true"
                        android:paddingBottom="36dp"
                        android:background="@drawable/widgets_surface_background"
                        android:importantForAccessibility="yes"
                        android:id="@+id/right_pane">
                        <com.android.launcher3.widget.picker.WidgetsRecommendationTableLayout
                            android:id="@+id/recommended_widget_table"
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->

<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <!-- General -->
    <skip />

    <!-- accessibilityPaneTitle for the right pane when showing suggested widgets. -->
    <string name="widget_picker_right_pane_accessibility_title"><xliff:g id="selected_header" example="Calendar">%1$s</xliff:g> widgets on left, search and options on right</string>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -77,6 +77,8 @@
    <string name="fitness_widget_recommendation_category_label">Reach Your Fitness Goals</string>
    <string name="weather_widget_recommendation_category_label">Stay Ahead of the Weather</string>
    <string name="others_widget_recommendation_category_label">You Might Also Like</string>
    <!-- accessibilityPaneTitle for the right pane when showing suggested widgets. -->
    <string name="widget_picker_right_pane_accessibility_title"><xliff:g id="selected_header" example="Calendar">%1$s</xliff:g> widgets on right, search and options on left</string>
    <!-- Label for showing the number of widgets an app has in the full widgets picker.
         [CHAR_LIMIT=25][ICU SYNTAX] -->
    <string name="widgets_count">
+12 −2
Original line number Diff line number Diff line
@@ -200,10 +200,14 @@ public class WidgetsTwoPaneSheet extends WidgetsFullSheet {
                return false;
            }
        };
        packageItemInfo.title = getContext().getString(R.string.suggested_widgets_header_title);
        String suggestionsHeaderTitle = getContext().getString(
                R.string.suggested_widgets_header_title);
        String suggestionsRightPaneTitle = getContext().getString(
                R.string.widget_picker_right_pane_accessibility_title, suggestionsHeaderTitle);
        packageItemInfo.title = suggestionsHeaderTitle;
        WidgetsListHeaderEntry widgetsListHeaderEntry = WidgetsListHeaderEntry.create(
                        packageItemInfo,
                        getContext().getString(R.string.suggested_widgets_header_title),
                        suggestionsHeaderTitle,
                        mActivityContext.getPopupDataProvider().getRecommendedWidgets())
                .withWidgetListShown();

@@ -216,10 +220,12 @@ public class WidgetsTwoPaneSheet extends WidgetsFullSheet {
            mRightPane.removeAllViews();
            mRightPane.addView(mRecommendedWidgetsTable);
            mRightPaneScrollView.setScrollY(0);
            mRightPane.setAccessibilityPaneTitle(suggestionsRightPaneTitle);
            mSuggestedWidgetsPackageUserKey = PackageUserKey.fromPackageItemInfo(packageItemInfo);
            mSelectedHeader = mSuggestedWidgetsPackageUserKey;
        });
        mSuggestedWidgetsContainer.addView(mSuggestedWidgetsHeader);
        mRightPane.setAccessibilityPaneTitle(suggestionsRightPaneTitle);
    }

    @Override
@@ -322,6 +328,10 @@ public class WidgetsTwoPaneSheet extends WidgetsFullSheet {
                mRightPane.removeAllViews();
                mRightPane.addView(widgetsRowViewHolder.itemView);
                mRightPaneScrollView.setScrollY(0);
                mRightPane.setAccessibilityPaneTitle(
                        getContext().getString(
                                R.string.widget_picker_right_pane_accessibility_title,
                                contentEntry.mPkgItem.title));
            }
        };
    }