Update contentDescription to announce 'than' rather than '>'
Root Cause: Talkback announce '>' (greater than), which is not user expected. Solution: Update contentDescription with string contain 'than' Bug: 378804585 Test: Enable screen reader to check Flag: EXEMPT bugfix Change-Id: Ibc7a2f7c7d1100dd25ddf29c2fffb22ac5ad52c6
This commit is contained in:
@@ -5672,6 +5672,8 @@
|
|||||||
<string name="accessibility_hearing_device_about_title">About hearing devices</string>
|
<string name="accessibility_hearing_device_about_title">About hearing devices</string>
|
||||||
<!-- Description for text in accessibility hearing aids footer. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=7451899224828040581] -->
|
<!-- Description for text in accessibility hearing aids footer. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=7451899224828040581] -->
|
||||||
<string name="accessibility_hearing_device_footer_summary">To find other hearing devices that aren’t supported by ASHA or LE Audio, tap <b>Pair new device</b> > <b>See more devices</b></string>
|
<string name="accessibility_hearing_device_footer_summary">To find other hearing devices that aren’t supported by ASHA or LE Audio, tap <b>Pair new device</b> > <b>See more devices</b></string>
|
||||||
|
<!-- Description for text in accessibility hearing aids footer. Replace '>' to 'then' for TTS to announce. [CHAR LIMIT=NONE BACKUP_MESSAGE_ID=7451899224828040581] -->
|
||||||
|
<string name="accessibility_hearing_device_footer_summary_tts">To find other hearing devices that aren’t supported by ASHA or LE Audio, tap <b>Pair new device</b> then <b>See more devices</b></string>
|
||||||
<!-- Title for the pair hearing device page. [CHAR LIMIT=25] -->
|
<!-- Title for the pair hearing device page. [CHAR LIMIT=25] -->
|
||||||
<string name="accessibility_hearing_device_pairing_page_title">Pair hearing device</string>
|
<string name="accessibility_hearing_device_pairing_page_title">Pair hearing device</string>
|
||||||
<!-- Subtitle for the pair hearing device page. [CHAR LIMIT=NONE] -->
|
<!-- Subtitle for the pair hearing device page. [CHAR LIMIT=NONE] -->
|
||||||
|
@@ -18,6 +18,9 @@ package com.android.settings.accessibility;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.preference.PreferenceScreen;
|
||||||
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
|
|
||||||
/** Preference controller for footer in hearing device page. */
|
/** Preference controller for footer in hearing device page. */
|
||||||
@@ -32,4 +35,17 @@ public class HearingDeviceFooterPreferenceController extends
|
|||||||
protected String getIntroductionTitle() {
|
protected String getIntroductionTitle() {
|
||||||
return mContext.getString(R.string.accessibility_hearing_device_about_title);
|
return mContext.getString(R.string.accessibility_hearing_device_about_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void displayPreference(@NonNull PreferenceScreen screen) {
|
||||||
|
super.displayPreference(screen);
|
||||||
|
|
||||||
|
final AccessibilityFooterPreference footerPreference =
|
||||||
|
screen.findPreference(getPreferenceKey());
|
||||||
|
// Need to update contentDescription string to announce "than" rather than ">"
|
||||||
|
final String summaryTts = mContext.getString(
|
||||||
|
R.string.accessibility_hearing_device_footer_summary_tts);
|
||||||
|
final String contentDescription = getIntroductionTitle() + "\n\n" + summaryTts;
|
||||||
|
footerPreference.setContentDescription(contentDescription);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user