A11y bug fixes for editor
Set profile photo content description as "Contact photo" if
in read-only mode, otherwise it's still "Change photo"
Set the whole row for read-only data to be focusable so it
reads the entire thing in one go
Fix ordering of content description for account header.
Test:
Manually verified the above.
Bug:32952012
Bug:32952102
Bug:32952414
Change-Id: I845f020e805a7f715892690b59c4bc00a8435e63
diff --git a/src/com/android/contacts/editor/RawContactEditorView.java b/src/com/android/contacts/editor/RawContactEditorView.java
index 8df7c37..8e177e4 100644
--- a/src/com/android/contacts/editor/RawContactEditorView.java
+++ b/src/com/android/contacts/editor/RawContactEditorView.java
@@ -685,10 +685,8 @@
private void bindData(Drawable icon, String iconContentDescription, CharSequence data,
CharSequence type, boolean isFirstEntry, boolean forceLTR) {
- final LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(
- Context.LAYOUT_INFLATER_SERVICE);
- final View field = inflater.inflate(R.layout.item_read_only_field, mKindSectionViews,
- false);
+ final View field = mLayoutInflater.inflate(R.layout.item_read_only_field, mKindSectionViews,
+ /* attachToRoot */ false);
if (isFirstEntry) {
final ImageView imageView = (ImageView) field.findViewById(R.id.kind_icon);
imageView.setImageDrawable(icon);
@@ -749,8 +747,7 @@
// Set the content description
mAccountHeaderContainer.setContentDescription(
- EditorUiUtils.getAccountInfoContentDescription(primaryText,
- secondaryText));
+ EditorUiUtils.getAccountInfoContentDescription(secondaryText, primaryText));
}
private void addAccountSelector(final RawContactDelta rawContactDelta) {