Add accessibility labels to buttons in compose screen. (#776)

* Add accessibility labels to buttons in compose screen.

* Localize accessibility labels.

* Put them in all files.
This commit is contained in:
Quin 2023-02-10 23:21:22 -07:00 committed by GitHub
parent 6883cbcc6c
commit e192135f37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 134 additions and 1 deletions

View file

@ -419,3 +419,11 @@
"filter.contexts.profiles" = "Perfils"; "filter.contexts.profiles" = "Perfils";
"filter.action.warning" = "Amaga amb un avís"; "filter.action.warning" = "Amaga amb un avís";
"filter.action.hide" = "Amaga per complet"; "filter.action.hide" = "Amaga per complet";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -419,3 +419,11 @@
"filter.contexts.profiles" = "Profile"; "filter.contexts.profiles" = "Profile";
"filter.action.warning" = "Mit einer Warnung ausblenden"; "filter.action.warning" = "Mit einer Warnung ausblenden";
"filter.action.hide" = "Komplett ausblenden"; "filter.action.hide" = "Komplett ausblenden";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -420,3 +420,11 @@
"filter.contexts.profiles" = "Profiles"; "filter.contexts.profiles" = "Profiles";
"filter.action.warning" = "Hide with a warning"; "filter.action.warning" = "Hide with a warning";
"filter.action.hide" = "Hide completely"; "filter.action.hide" = "Hide completely";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -421,3 +421,11 @@
"filter.contexts.profiles" = "Profiles"; "filter.contexts.profiles" = "Profiles";
"filter.action.warning" = "Hide with a warning"; "filter.action.warning" = "Hide with a warning";
"filter.action.hide" = "Hide completely"; "filter.action.hide" = "Hide completely";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -421,3 +421,11 @@
"filter.contexts.profiles" = "Perfiles"; "filter.contexts.profiles" = "Perfiles";
"filter.action.warning" = "Ocultar con una advertencia"; "filter.action.warning" = "Ocultar con una advertencia";
"filter.action.hide" = "Ocultar completamente"; "filter.action.hide" = "Ocultar completamente";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -419,3 +419,11 @@
"filter.contexts.profiles" = "Profilak"; "filter.contexts.profiles" = "Profilak";
"filter.action.warning" = "Ezkutatu abisu batekin"; "filter.action.warning" = "Ezkutatu abisu batekin";
"filter.action.hide" = "Ezkutatu guztiz"; "filter.action.hide" = "Ezkutatu guztiz";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -417,3 +417,10 @@
"filter.action.warning" = "Cacher avec avertissement"; "filter.action.warning" = "Cacher avec avertissement";
"filter.action.hide" = "Cacher complètement"; "filter.action.hide" = "Cacher complètement";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -421,3 +421,11 @@
"filter.contexts.profiles" = "Nei profili"; "filter.contexts.profiles" = "Nei profili";
"filter.action.warning" = "Nascondi con un avviso"; "filter.action.warning" = "Nascondi con un avviso";
"filter.action.hide" = "Nascondi completamente"; "filter.action.hide" = "Nascondi completamente";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -420,3 +420,11 @@
"filter.contexts.profiles" = "プロフィール"; "filter.contexts.profiles" = "プロフィール";
"filter.action.warning" = "警告して非表示"; "filter.action.warning" = "警告して非表示";
"filter.action.hide" = "完全に非表示"; "filter.action.hide" = "完全に非表示";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -422,3 +422,11 @@
"filter.contexts.profiles" = "프로필"; "filter.contexts.profiles" = "프로필";
"filter.action.warning" = "경고 표시하고 글 가리기"; "filter.action.warning" = "경고 표시하고 글 가리기";
"filter.action.hide" = "완전히 숨기기"; "filter.action.hide" = "완전히 숨기기";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -420,3 +420,11 @@
"filter.contexts.profiles" = "Profiler"; "filter.contexts.profiles" = "Profiler";
"filter.action.warning" = "Skjul med advarsel"; "filter.action.warning" = "Skjul med advarsel";
"filter.action.hide" = "Skjul helt"; "filter.action.hide" = "Skjul helt";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -417,3 +417,11 @@
"enum.expand-media.show" = "Toon alle"; "enum.expand-media.show" = "Toon alle";
"enum.expand-media.hide" = "Verberg alle"; "enum.expand-media.hide" = "Verberg alle";
"enum.expand-media.hide-sensitive" = "Verberg gevoelige"; "enum.expand-media.hide-sensitive" = "Verberg gevoelige";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -413,3 +413,11 @@
"filter.contexts.profiles" = "Profile"; "filter.contexts.profiles" = "Profile";
"filter.action.warning" = "Ukryj z ostrzeżeniem"; "filter.action.warning" = "Ukryj z ostrzeżeniem";
"filter.action.hide" = "Ukryj całkowicie"; "filter.action.hide" = "Ukryj całkowicie";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -420,3 +420,11 @@
"filter.contexts.profiles" = "Perfis"; "filter.contexts.profiles" = "Perfis";
"filter.action.warning" = "Ocultar com um aviso"; "filter.action.warning" = "Ocultar com um aviso";
"filter.action.hide" = "Ocultar completamente"; "filter.action.hide" = "Ocultar completamente";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -420,3 +420,11 @@
"enum.expand-media.show" = "Show All"; "enum.expand-media.show" = "Show All";
"enum.expand-media.hide" = "Hide All"; "enum.expand-media.hide" = "Hide All";
"enum.expand-media.hide-sensitive" = "Hide Sensitive"; "enum.expand-media.hide-sensitive" = "Hide Sensitive";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -424,3 +424,11 @@
"enum.expand-media.show" = "显示所有"; "enum.expand-media.show" = "显示所有";
"enum.expand-media.hide" = "隐藏所有"; "enum.expand-media.hide" = "隐藏所有";
"enum.expand-media.hide-sensitive" = "隐藏敏感内容"; "enum.expand-media.hide-sensitive" = "隐藏敏感内容";
// MARK: Accessibility
"accessibility.editor.button.attach-photo" = "Attach photo";
"accessibility.editor.button.poll" = "Poll";
"accessibility.editor.button.spoiler" = "Spoiler warning";
"accessibility.editor.button.drafts" = "Drafts";
"accessibility.editor.button.custom-emojis" = "Custom emojis";
"accessibility.editor.button.language" = "Language";

View file

@ -33,6 +33,7 @@ struct StatusEditorAccessoryView: View {
Image(systemName: "photo.fill.on.rectangle.fill") Image(systemName: "photo.fill.on.rectangle.fill")
} }
} }
.accessibilityLabel("accessibility.editor.button.attach-photo")
.disabled(viewModel.showPoll) .disabled(viewModel.showPoll)
Button { Button {
@ -42,6 +43,7 @@ struct StatusEditorAccessoryView: View {
} label: { } label: {
Image(systemName: "chart.bar") Image(systemName: "chart.bar")
} }
.accessibilityLabel("accessibility.editor.button.poll")
.disabled(viewModel.shouldDisablePollButton) .disabled(viewModel.shouldDisablePollButton)
Button { Button {
@ -52,6 +54,7 @@ struct StatusEditorAccessoryView: View {
} label: { } label: {
Image(systemName: viewModel.spoilerOn ? "exclamationmark.triangle.fill" : "exclamationmark.triangle") Image(systemName: viewModel.spoilerOn ? "exclamationmark.triangle.fill" : "exclamationmark.triangle")
} }
.accessibilityLabel("accessibility.editor.button.spoiler")
if !viewModel.mode.isInShareExtension { if !viewModel.mode.isInShareExtension {
Button { Button {
@ -59,6 +62,7 @@ struct StatusEditorAccessoryView: View {
} label: { } label: {
Image(systemName: "archivebox") Image(systemName: "archivebox")
} }
.accessibilityLabel("accessibility.editor.button.drafts")
} }
if !viewModel.customEmojis.isEmpty { if !viewModel.customEmojis.isEmpty {
@ -67,6 +71,7 @@ struct StatusEditorAccessoryView: View {
} label: { } label: {
Image(systemName: "face.smiling.inverse") Image(systemName: "face.smiling.inverse")
} }
.accessibilityLabel("accessibility.editor.button.custom-emojis")
} }
Button { Button {
@ -78,6 +83,7 @@ struct StatusEditorAccessoryView: View {
Image(systemName: "globe") Image(systemName: "globe")
} }
} }
.accessibilityLabel("accessibility.editor.button.language")
if preferences.isOpenAIEnabled { if preferences.isOpenAIEnabled {
AIMenu.disabled(!viewModel.canPost) AIMenu.disabled(!viewModel.canPost)