Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[a11y] Correct label for each activities and fragments #4470

Merged
merged 10 commits into from
Sep 24, 2024
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ownCloud admins and users.
* Enhancement - Roles added to some elements to improve accessibility: [#4373](https://github.com/owncloud/android/issues/4373)
* Enhancement - Hardware keyboard support: [#4438](https://github.com/owncloud/android/pull/4438)
* Enhancement - Hardware keyboard support for passcode view: [#4447](https://github.com/owncloud/android/issues/4447)
* Enhancement - TalkBack announces the view label correctly: [#4458](https://github.com/owncloud/android/issues/4458)

## Details

Expand Down Expand Up @@ -147,6 +148,14 @@ ownCloud admins and users.
https://github.com/owncloud/android/issues/4447
https://github.com/owncloud/android/pull/4455

* Enhancement - TalkBack announces the view label correctly: [#4458](https://github.com/owncloud/android/issues/4458)

TalkBack no longer announces "ownCloud" every time the screen changes. Now, it
correctly dictates the name of the current view.

https://github.com/owncloud/android/issues/4458
https://github.com/owncloud/android/pull/4470

# Changelog for ownCloud Android Client [4.3.1] (2024-07-22)

The following sections list the changes in ownCloud Android Client 4.3.1 relevant to
Expand Down
6 changes: 6 additions & 0 deletions changelog/unreleased/4470
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: TalkBack announces the view label correctly

TalkBack no longer announces "ownCloud" every time the screen changes. Now, it correctly dictates the name of the current view.

https://github.com/owncloud/android/issues/4458
https://github.com/owncloud/android/pull/4470
17 changes: 15 additions & 2 deletions owncloudApp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
android:theme="@style/Theme.ownCloud.Toolbar">
<activity
android:name=".ui.preview.PreviewVideoActivity"
android:label="@string/video_preview_label"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:theme="@style/Theme.ownCloud.Video"
android:exported="false" />
Expand All @@ -67,8 +68,11 @@

<activity
android:name=".presentation.releasenotes.ReleaseNotesActivity"
android:label="@string/release_notes_label"
android:exported="false" />
<activity android:name=".presentation.settings.privacypolicy.PrivacyPolicyActivity" />
<activity
android:name=".presentation.settings.privacypolicy.PrivacyPolicyActivity"
android:label="@string/actionbar_privacy_policy" />
<activity android:name=".presentation.settings.SettingsActivity" />
<activity android:name=".presentation.migration.StorageMigrationActivity" />
<activity
Expand All @@ -89,6 +93,7 @@
<activity
android:name=".ui.activity.ReceiveExternalFilesActivity"
android:configChanges="orientation|screenSize"
android:label="@string/receive_external_files_label"
android:excludeFromRecents="true"
android:exported="true"
android:taskAffinity="">
Expand All @@ -109,6 +114,7 @@
</activity>
<activity
android:name=".ui.preview.PreviewImageActivity"
android:label="@string/image_preview_label"
android:theme="@style/Theme.ownCloud.Overlay" />

<service
Expand Down Expand Up @@ -175,26 +181,31 @@

<activity
android:name=".presentation.security.passcode.PassCodeActivity"
android:label="@string/passcode_label"
android:screenOrientation="portrait"
android:theme="@style/Theme.ownCloud" />
<activity
android:name=".presentation.conflicts.ConflictsResolveActivity"
android:theme="@style/Theme.ownCloud" />
<activity
android:name=".presentation.logging.LogsListActivity"
android:label="@string/prefs_log_open_logs_list_view"
android:configChanges="orientation|screenSize" />
<activity android:name=".ui.errorhandling.ErrorShowActivity" />
<activity
android:name=".ui.activity.UploadListActivity"
android:label="@string/bottom_nav_uploads"
android:theme="@style/Theme.ownCloud.Toolbar.Drawer" />
<activity
android:name=".ui.activity.WhatsNewActivity"
android:label="@string/whats_new_label"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name=".ui.activity.CopyToClipboardActivity"
android:icon="@drawable/copy_link"
android:label="@string/copy_link" />
<activity android:name=".ui.activity.FolderPickerActivity" />
<activity android:name=".ui.activity.FolderPickerActivity"
android:label="@string/folder_picker_label"/>
<activity
android:name=".presentation.sharing.ShareActivity"
android:exported="false"
Expand All @@ -213,11 +224,13 @@
<activity
android:name=".presentation.security.pattern.PatternActivity"
android:screenOrientation="portrait"
android:label="@string/pattern_label"
android:theme="@style/Theme.ownCloud" />
<activity android:name=".presentation.security.biometric.BiometricActivity" />
<activity
android:name=".presentation.authentication.LoginActivity"
android:exported="true"
android:label="@string/login_label"
android:launchMode="singleTask"
android:theme="@style/Theme.ownCloud.Toolbar">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ class FileDetailsFragment : FileFragment() {
}
startListeningToOngoingTransfers()
fileDetailsViewModel.checkOnGoingTransfersWhenOpening()
requireActivity().title = getString(R.string.details_label)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class LogsListActivity : AppCompatActivity() {
findViewById<ConstraintLayout>(R.id.root_toolbar).isVisible = false
setSupportActionBar(toolbar)
supportActionBar?.apply {
setTitle(R.string.prefs_log_open_logs_list_view)
setDisplayHomeAsUpEnabled(true)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
*
* @author Juan Carlos Garrote Gascón
* @author David Crespo Ríos
* @author Aitor Ballesteros Pavón
*
* Copyright (C) 2021 ownCloud GmbH.
* Copyright (C) 2024 ownCloud GmbH.
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand Down Expand Up @@ -70,7 +71,7 @@ class SettingsActivity : AppCompatActivity() {
is SettingsMoreFragment -> R.string.prefs_subsection_more
else -> R.string.actionbar_settings
}

setTitle(titleId)
JuancaG05 marked this conversation as resolved.
Show resolved Hide resolved
supportActionBar?.setTitle(titleId)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ class FileDisplayActivity : FileActivity(),
FileListOption.ALL_FILES -> getString(R.string.default_display_name_for_root_folder)
FileListOption.SPACES_LIST -> getString(R.string.bottom_nav_spaces)
}
setTitle(title)
setupRootToolbar(title = title, isSearchEnabled = true, isAvatarRequested = false)
} else if (space?.isProject == true && chosenFile.remotePath == OCFile.ROOT_PATH) {
updateStandardToolbar(title = space.name, displayHomeAsUpEnabled = true, homeButtonEnabled = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class PreviewAudioFragment : FileFragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setHasOptionsMenu(true)
requireActivity().title = getString(R.string.audio_preview_label)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class PreviewTextFragment : FileFragment() {
file = savedInstanceState.getParcelable(EXTRA_FILE)
account = savedInstanceState.getParcelable(EXTRA_ACCOUNT)
}
requireActivity().title = getString(R.string.text_preview_label)
setFile(file)
setHasOptionsMenu(true)
isOpen = true
Expand Down
13 changes: 13 additions & 0 deletions owncloudApp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -829,4 +829,17 @@
<string name="link_role_accessibility">Link</string>
<string name="button_role_accessibility">Button</string>

<string name="folder_picker_label">Folder picker</string>
<string name="passcode_label">Passcode</string>
<string name="pattern_label">Pattern</string>
<string name="receive_external_files_label">Receive external files</string>
<string name="video_preview_label">Video preview</string>
<string name="release_notes_label">Release notes</string>
<string name="image_preview_label">Image preview</string>
<string name="login_label">Login</string>
<string name="whats_new_label">What\'s new</string>
<string name="audio_preview_label">Audio preview</string>
<string name="details_label">Details</string>
<string name="text_preview_label">Text preview</string>

</resources>
Loading