diff --git a/app/src/main/java/com/alfresco/content/app/activity/SettingsActivity.kt b/app/src/main/java/com/alfresco/content/app/activity/SettingsActivity.kt index e92378b34..39d27c6fa 100644 --- a/app/src/main/java/com/alfresco/content/app/activity/SettingsActivity.kt +++ b/app/src/main/java/com/alfresco/content/app/activity/SettingsActivity.kt @@ -17,6 +17,7 @@ class SettingsActivity : AppCompatActivity() { setSupportActionBar(toolbar) supportActionBar?.setDisplayShowHomeEnabled(true) supportActionBar?.setDisplayHomeAsUpEnabled(true) + supportActionBar?.setHomeActionContentDescription(getString(R.string.accessibility_text_close)) supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_close) toolbar.setNavigationOnClickListener { onBackPressed() } diff --git a/app/src/main/java/com/alfresco/content/app/fragment/SettingsFragment.kt b/app/src/main/java/com/alfresco/content/app/fragment/SettingsFragment.kt index 9ff5461e8..627c78571 100644 --- a/app/src/main/java/com/alfresco/content/app/fragment/SettingsFragment.kt +++ b/app/src/main/java/com/alfresco/content/app/fragment/SettingsFragment.kt @@ -35,6 +35,7 @@ class SettingsFragment : PreferenceFragmentCompat() { val acc = SessionManager.requireSession.account preferenceScreen.findPreference(resources.getString(R.string.pref_account_key))?.apply { + accessibilityTextUserInfo = getString(R.string.accessibility_text_user_info, acc.displayName, acc.email) title = acc.displayName summary = acc.email loadAny(PeopleRepository.myPicture()) { diff --git a/app/src/main/java/com/alfresco/content/app/widget/AccountPreference.kt b/app/src/main/java/com/alfresco/content/app/widget/AccountPreference.kt index e1dbf3a2a..01df8d80a 100644 --- a/app/src/main/java/com/alfresco/content/app/widget/AccountPreference.kt +++ b/app/src/main/java/com/alfresco/content/app/widget/AccountPreference.kt @@ -3,6 +3,7 @@ package com.alfresco.content.app.widget import android.content.Context import android.util.AttributeSet import android.view.View +import android.widget.LinearLayout import androidx.preference.Preference import androidx.preference.PreferenceViewHolder import com.alfresco.content.app.R @@ -11,11 +12,15 @@ import com.google.android.material.button.MaterialButton class AccountPreference(context: Context, attrs: AttributeSet?) : Preference(context, attrs) { private lateinit var signOutButton: MaterialButton + private lateinit var parentUserInfo: LinearLayout var onSignOutClickListener: View.OnClickListener? = null + var accessibilityTextUserInfo = "" override fun onBindViewHolder(holder: PreferenceViewHolder) { super.onBindViewHolder(holder) signOutButton = holder.findViewById(R.id.sign_out_button) as MaterialButton + parentUserInfo = holder.findViewById(R.id.parent_user_info) as LinearLayout + parentUserInfo.contentDescription = accessibilityTextUserInfo signOutButton.setOnClickListener(onSignOutClickListener) } } diff --git a/app/src/main/res/layout/layout_pref_account.xml b/app/src/main/res/layout/layout_pref_account.xml index f42d0b4e7..86dc3e4b9 100644 --- a/app/src/main/res/layout/layout_pref_account.xml +++ b/app/src/main/res/layout/layout_pref_account.xml @@ -7,10 +7,12 @@ android:orientation="vertical"> Can\'t share more than 50 media items No Type User Profile Button + Username: %s Email: %s + Close Wi-Fi only