From eab69ce9fa5a435af9a6515e19433ac55a54e10f Mon Sep 17 00:00:00 2001 From: Chris Kolbu Date: Mon, 20 Mar 2023 16:33:42 +1100 Subject: [PATCH] Timeline tab accessibility uplift (#1277) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refine Profile tab VoiceOver order to prioritise user information Previously, VoiceOver user would have to traverse through header image, “follows you”, and the profile image before getting to the display name of the user. Now, this element is the first element after the navigation bar. * Add accessibility label to Timeline Compose post button Previously, this button was using the SF symbol fallback label. Now, it has a localized equivalent in addition to two other options: “New”, and “Create” * Change accessible representation of Timeline nav bar menu Previously, this would present as a static text. Now, it has the header trait. In addition, by changing the representation, VoiceOver will read it out as “Home, Pop-up button, Header”, indicating that it opens a menu. * Add accessibilityHint to Timeline tab Accounts selector * Add accessibilityLabel and hint to PendingStatusesObserver Previously, this button would have a label equal to the count of unread posts. Now, it states “X new posts” with the hint “Scrolls the timeline” --- .../Localization/be.lproj/Localizable.strings | 6 ++++++ .../Localization/ca.lproj/Localizable.strings | 6 ++++++ .../Localization/de.lproj/Localizable.strings | 6 ++++++ .../Localization/en-GB.lproj/Localizable.strings | 6 ++++++ .../Localization/en.lproj/Localizable.strings | 6 ++++++ .../Localization/es.lproj/Localizable.strings | 6 ++++++ .../Localization/eu.lproj/Localizable.strings | 6 ++++++ .../Localization/fr.lproj/Localizable.strings | 6 ++++++ .../Localization/it.lproj/Localizable.strings | 6 ++++++ .../Localization/ja.lproj/Localizable.strings | 6 ++++++ .../Localization/ko.lproj/Localizable.strings | 6 ++++++ .../Localization/nb.lproj/Localizable.strings | 6 ++++++ .../Localization/nl.lproj/Localizable.strings | 6 ++++++ .../Localization/pl.lproj/Localizable.strings | 6 ++++++ .../Localization/pt-BR.lproj/Localizable.strings | 6 ++++++ .../Localization/tr.lproj/Localizable.strings | 6 ++++++ .../Localization/uk.lproj/Localizable.strings | 6 ++++++ .../Localization/zh-Hans.lproj/Localizable.strings | 6 ++++++ .../Localization/zh-Hant.lproj/Localizable.strings | 6 ++++++ .../Sources/Account/AccountDetailHeaderView.swift | 5 ++++- .../Sources/AppAccount/AppAccountsSelectorView.swift | 1 + .../DesignSystem/Views/StatusEditorToolbarItem.swift | 12 ++++++++++++ .../Sources/Timeline/PendingStatusesObserver.swift | 4 ++++ .../Timeline/Sources/Timeline/TimelineView.swift | 4 ++++ 24 files changed, 139 insertions(+), 1 deletion(-) diff --git a/IceCubesApp/Resources/Localization/be.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/be.lproj/Localizable.strings index e14ae7e9..07924067 100644 --- a/IceCubesApp/Resources/Localization/be.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/be.lproj/Localizable.strings @@ -524,7 +524,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Дадаць уліковы запіс"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Уліковыя запісы"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/ca.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/ca.lproj/Localizable.strings index 655b26b8..70816fc4 100644 --- a/IceCubesApp/Resources/Localization/ca.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/ca.lproj/Localizable.strings @@ -518,7 +518,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Add account"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Accounts"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings index cdc54e15..de5f1d99 100644 --- a/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/de.lproj/Localizable.strings @@ -514,7 +514,13 @@ "accessibility.editor.privacy.label" = "Sichtbarkeit"; "accessibility.editor.privacy.hint" = "Ändert das Beitragspublikum."; "accessibility.tabs.timeline.add-account" = "Konto hinzufügen"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Konten"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/en-GB.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/en-GB.lproj/Localizable.strings index f8c1b9bc..f526a4be 100644 --- a/IceCubesApp/Resources/Localization/en-GB.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/en-GB.lproj/Localizable.strings @@ -518,10 +518,16 @@ "accessibility.editor.button.language" = "Language"; "accessibility.editor.button.ai-prompt" = "AI prompt"; "accessibility.tabs.timeline.add-account" = "Add Account"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.editor.button.characters-remaining" = "Characters remaining"; "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.app-account.selector.accounts" = "Accounts"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings index 17e56dce..f0cc4545 100644 --- a/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/en.lproj/Localizable.strings @@ -520,7 +520,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Add Account"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Accounts"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings index 05135fd0..3154075c 100644 --- a/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/es.lproj/Localizable.strings @@ -520,7 +520,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Añadir cuenta"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Cuentas"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/eu.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/eu.lproj/Localizable.strings index 6851c4a6..38bfaaed 100644 --- a/IceCubesApp/Resources/Localization/eu.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/eu.lproj/Localizable.strings @@ -509,7 +509,13 @@ "accessibility.editor.privacy.label" = "Ikusgaitasuna"; "accessibility.editor.privacy.hint" = "Nork ikus dezakeen aldatzen du."; "accessibility.tabs.timeline.add-account" = "Gehitu kontua"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Kontuak"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/fr.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/fr.lproj/Localizable.strings index 2a096cad..d95c6e1a 100644 --- a/IceCubesApp/Resources/Localization/fr.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/fr.lproj/Localizable.strings @@ -515,7 +515,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Ajouter un compte>"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Comptes"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings index 5b2e298c..7c2840fe 100644 --- a/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/it.lproj/Localizable.strings @@ -519,7 +519,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Aggiungi account"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Account"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings index 8c7fea86..caa9529d 100644 --- a/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/ja.lproj/Localizable.strings @@ -519,7 +519,13 @@ "accessibility.editor.privacy.label" = "可視性"; "accessibility.editor.privacy.hint" = "投稿対象者を変更します"; "accessibility.tabs.timeline.add-account" = "アカウントを追加"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "アカウント"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/ko.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/ko.lproj/Localizable.strings index 06f9a7b0..f9f6208d 100644 --- a/IceCubesApp/Resources/Localization/ko.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/ko.lproj/Localizable.strings @@ -521,7 +521,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "계정 추가"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "계정"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/nb.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/nb.lproj/Localizable.strings index 6a8af4a2..2dd21f97 100644 --- a/IceCubesApp/Resources/Localization/nb.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/nb.lproj/Localizable.strings @@ -519,7 +519,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Add account"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Accounts"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings index 117b2a31..c302aba7 100644 --- a/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/nl.lproj/Localizable.strings @@ -516,7 +516,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Voeg account toe"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Accounts"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/pl.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/pl.lproj/Localizable.strings index 434c7db1..7c740d58 100644 --- a/IceCubesApp/Resources/Localization/pl.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/pl.lproj/Localizable.strings @@ -511,7 +511,13 @@ "accessibility.editor.privacy.label" = "Widoczność postu"; "accessibility.editor.privacy.hint" = "Zmienia odbiorców postu."; "accessibility.tabs.timeline.add-account" = "Dodaj konto"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Konta"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/pt-BR.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/pt-BR.lproj/Localizable.strings index d00f0cba..ad1e51bb 100644 --- a/IceCubesApp/Resources/Localization/pt-BR.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/pt-BR.lproj/Localizable.strings @@ -519,7 +519,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Adicionar conta"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Contas"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings index 60244aee..8511a56a 100644 --- a/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/tr.lproj/Localizable.strings @@ -519,7 +519,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Add account"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Accounts"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/uk.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/uk.lproj/Localizable.strings index ecacc668..f74757b6 100644 --- a/IceCubesApp/Resources/Localization/uk.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/uk.lproj/Localizable.strings @@ -520,7 +520,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "Додати профіль"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "Профілі"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings index 7c0c72e1..c2f98ccd 100644 --- a/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/zh-Hans.lproj/Localizable.strings @@ -521,7 +521,13 @@ "accessibility.editor.privacy.label" = "可见度"; "accessibility.editor.privacy.hint" = "更改嘟文可见度。"; "accessibility.tabs.timeline.add-account" = "添加账户"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "账户"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/IceCubesApp/Resources/Localization/zh-Hant.lproj/Localizable.strings b/IceCubesApp/Resources/Localization/zh-Hant.lproj/Localizable.strings index b00d559a..f69e72b1 100644 --- a/IceCubesApp/Resources/Localization/zh-Hant.lproj/Localizable.strings +++ b/IceCubesApp/Resources/Localization/zh-Hant.lproj/Localizable.strings @@ -519,7 +519,13 @@ "accessibility.editor.privacy.label" = "Visibility"; "accessibility.editor.privacy.hint" = "Changes post audience."; "accessibility.tabs.timeline.add-account" = "新增帳號"; +"accessibility.tabs.timeline.new-post.label" = "Compose"; +"accessibility.tabs.timeline.new-post.inputLabel1" = "New"; +"accessibility.tabs.timeline.new-post.inputLabel2" = "Create"; +"accessibility.tabs.timeline.unread-posts.label-%lld" = "%lld new posts"; +"accessibility.tabs.timeline.unread-posts.hint" = "Scrolls the timeline."; "accessibility.app-account.selector.accounts" = "帳號"; +"accessibility.app-account.selector.accounts.hint" = "Opens options sheet."; "accessibility.tabs.profile.options.label" = "Options"; "accessibility.tabs.profile.options.inputLabel1" = "Settings"; "accessibility.tabs.profile.options.inputLabel2" = "More"; diff --git a/Packages/Account/Sources/Account/AccountDetailHeaderView.swift b/Packages/Account/Sources/Account/AccountDetailHeaderView.swift index de372483..73a0fc4e 100644 --- a/Packages/Account/Sources/Account/AccountDetailHeaderView.swift +++ b/Packages/Account/Sources/Account/AccountDetailHeaderView.swift @@ -198,7 +198,10 @@ struct AccountDetailHeaderView: View { .textSelection(.enabled) .accessibilityRespondsToUserInteraction(false) joinedAtView - }.accessibilityElement(children: .contain) + } + .accessibilityElement(children: .contain) + .accessibilitySortPriority(1) + Spacer() if let relationship = viewModel.relationship, !viewModel.isCurrentUser { HStack { diff --git a/Packages/AppAccount/Sources/AppAccount/AppAccountsSelectorView.swift b/Packages/AppAccount/Sources/AppAccount/AppAccountsSelectorView.swift index 720e9062..342945b9 100644 --- a/Packages/AppAccount/Sources/AppAccount/AppAccountsSelectorView.swift +++ b/Packages/AppAccount/Sources/AppAccount/AppAccountsSelectorView.swift @@ -77,6 +77,7 @@ public struct AppAccountsSelectorView: View { } } .accessibilityLabel("accessibility.app-account.selector.accounts") + .accessibilityHint("accessibility.app-account.selector.accounts.hint") } private var accountsView: some View { diff --git a/Packages/DesignSystem/Sources/DesignSystem/Views/StatusEditorToolbarItem.swift b/Packages/DesignSystem/Sources/DesignSystem/Views/StatusEditorToolbarItem.swift index 27728ead..4ee1442e 100644 --- a/Packages/DesignSystem/Sources/DesignSystem/Views/StatusEditorToolbarItem.swift +++ b/Packages/DesignSystem/Sources/DesignSystem/Views/StatusEditorToolbarItem.swift @@ -11,6 +11,12 @@ public extension View { HapticManager.shared.fireHaptic(of: .buttonPress) } label: { Image(systemName: "square.and.pencil") + .accessibilityLabel("accessibility.tabs.timeline.new-post.label") + .accessibilityInputLabels([ + LocalizedStringKey("accessibility.tabs.timeline.new-post.label"), + LocalizedStringKey("accessibility.tabs.timeline.new-post.inputLabel1"), + LocalizedStringKey("accessibility.tabs.timeline.new-post.inputLabel2") + ]) } } } @@ -32,6 +38,12 @@ public struct StatusEditorToolbarItem: ToolbarContent { HapticManager.shared.fireHaptic(of: .buttonPress) } label: { Image(systemName: "square.and.pencil") + .accessibilityLabel("accessibility.tabs.timeline.new-post.label") + .accessibilityInputLabels([ + LocalizedStringKey("accessibility.tabs.timeline.new-post.label"), + LocalizedStringKey("accessibility.tabs.timeline.new-post.inputLabel1"), + LocalizedStringKey("accessibility.tabs.timeline.new-post.inputLabel2") + ]) } } } diff --git a/Packages/Timeline/Sources/Timeline/PendingStatusesObserver.swift b/Packages/Timeline/Sources/Timeline/PendingStatusesObserver.swift index 1a681a31..488f2bd8 100644 --- a/Packages/Timeline/Sources/Timeline/PendingStatusesObserver.swift +++ b/Packages/Timeline/Sources/Timeline/PendingStatusesObserver.swift @@ -37,7 +37,11 @@ struct PendingStatusesObserverView: View { observer.scrollToIndex?(observer.pendingStatusesCount) } label: { Text("\(observer.pendingStatusesCount)") + // Accessibility: this results in a frame with a size of at least 44x44 at regular font size + .frame(minWidth: 30, minHeight: 30) } + .accessibilityLabel("accessibility.tabs.timeline.unread-posts.label-\(observer.pendingStatusesCount)") + .accessibilityHint("accessibility.tabs.timeline.unread-posts.hint") .buttonStyle(.bordered) .background(.thinMaterial) .cornerRadius(8) diff --git a/Packages/Timeline/Sources/Timeline/TimelineView.swift b/Packages/Timeline/Sources/Timeline/TimelineView.swift index efe52aca..c4e60b64 100644 --- a/Packages/Timeline/Sources/Timeline/TimelineView.swift +++ b/Packages/Timeline/Sources/Timeline/TimelineView.swift @@ -98,6 +98,10 @@ public struct TimelineView: View { .font(.headline) } } + .accessibilityRepresentation { + Menu(timeline.localizedTitle()) {} + } + .accessibilityAddTraits(.isHeader) } } .navigationBarTitleDisplayMode(.inline)