Add content description to QR code image for talkback.

- Rename string name for reuse purpose.

Test: Visual
Flag: EXEMPT bug fix
Bug: 350603175
Change-Id: Id5b1383c9cf1c2509a621bb9b225e0efeb58ca7f
This commit is contained in:
Yuchen Sun
2024-07-25 06:40:26 +00:00
parent 8a4a5f207e
commit 01ecf76247
4 changed files with 5 additions and 4 deletions

View File

@@ -48,7 +48,7 @@
android:id="@+id/qrcode_view"
android:layout_width="@dimen/qrcode_size"
android:layout_height="@dimen/qrcode_size"
android:contentDescription="@string/audio_streams_qr_code_page_image_label"
android:contentDescription="@string/qr_code_content_description"
android:focusable="true" />
<TextView

View File

@@ -48,7 +48,7 @@
android:id="@+id/qrcode_view"
android:layout_width="@dimen/qrcode_size"
android:layout_height="@dimen/qrcode_size"
android:contentDescription="@string/audio_streams_qr_code_page_image_label"
android:contentDescription="@string/qr_code_content_description"
android:focusable="true"/>
<TextView

View File

@@ -78,6 +78,8 @@
<!-- Content description for preview pager. [CHAR LIMIT=NONE] -->
<string name="preview_pager_content_description">Preview</string>
<!-- Content description for qrcode image. [CHAR LIMIT=none]-->
<string name="qr_code_content_description">QR code</string>
<!-- Description for the button that makes interface elements smaller. [CHAR_LIMIT=NONE] -->
<string name="font_size_make_smaller_desc">Make smaller</string>
@@ -13760,8 +13762,6 @@
<string name="audio_streams_main_page_qr_code_scanner_summary">Scan an audio stream QR code to listen with <xliff:g example="LE headset" id="device_name">%1$s</xliff:g></string>
<!-- Le audio streams password dialog [CHAR LIMIT=NONE] -->
<string name="audio_streams_main_page_password_dialog_cannot_edit">Can\u0027t edit password while sharing. To change the password, first turn off audio sharing.</string>
<!-- Text for audio sharing qrcode image [CHAR LIMIT=none]-->
<string name="audio_streams_qr_code_page_image_label">QR code</string>
<!-- Text for audio sharing qrcode scanner [CHAR LIMIT=none]-->
<string name="audio_streams_qr_code_scanner_label">QR code scanner</string>

View File

@@ -114,6 +114,7 @@ public class WifiDppQrCodeGeneratorFragment extends WifiDppQrCodeBaseFragment {
super.onViewCreated(view, savedInstanceState);
mQrCodeView = view.findViewById(R.id.qrcode_view);
mQrCodeView.setContentDescription(getString(R.string.qr_code_content_description));
final WifiNetworkConfig wifiNetworkConfig = getWifiNetworkConfigFromHostActivity();
if (wifiNetworkConfig.isHotspot()) {