1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Applied patch by ndarilek (thanks!) to add android:contentDescription attributes to unlabeled input fields to improve accessibility.

Fixes issue 1948
This commit is contained in:
cketti 2010-07-08 12:18:12 +00:00
parent 8bc42639c4
commit b188630eb4
8 changed files with 69 additions and 31 deletions

View File

@ -13,6 +13,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:paddingBottom="10dip" android:paddingBottom="10dip"
android:focusable="true"
/> />
<Button <Button
android:id="@+id/pop" android:id="@+id/pop"

View File

@ -22,6 +22,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:paddingBottom="10dip" android:paddingBottom="10dip"
android:focusable="true"
/> />
<EditText <EditText
android:id="@+id/account_email" android:id="@+id/account_email"

View File

@ -20,12 +20,14 @@
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary" android:textColor="?android:attr/textColorPrimary"
android:paddingBottom="6dip" android:paddingBottom="6dip"
android:focusable="true"
/> />
<ProgressBar <ProgressBar
android:id="@+id/progress" android:id="@+id/progress"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
style="?android:attr/progressBarStyleHorizontal" /> style="?android:attr/progressBarStyleHorizontal"
android:focusable="true" />
<View <View
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="0dip" android:layout_height="0dip"

View File

@ -21,6 +21,7 @@
android:inputType="textPersonName" android:inputType="textPersonName"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:contentDescription="@string/account_settings_name_label"
/> />
<TextView <TextView
android:text="@string/account_settings_email_label" android:text="@string/account_settings_email_label"
@ -34,7 +35,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:contentDescription="@string/account_settings_email_label"
/> />
<TextView <TextView
android:text="@string/account_settings_always_bcc_label" android:text="@string/account_settings_always_bcc_label"
@ -47,7 +49,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_settings_always_bcc_label" />
<CheckBox <CheckBox
android:id="@+id/account_signature_use" android:id="@+id/account_signature_use"
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -69,7 +72,8 @@
android:id="@+id/account_signature" android:id="@+id/account_signature"
android:inputType="textMultiLine|textAutoCorrect|textCapSentences" android:inputType="textMultiLine|textAutoCorrect|textCapSentences"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_settings_signature_label" />
<TextView <TextView
android:text="@string/account_settings_signature__location_label" android:text="@string/account_settings_signature__location_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -85,12 +89,14 @@
android:id="@+id/account_signature_location_before_quoted_text" android:id="@+id/account_signature_location_before_quoted_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/account_settings_signature__location_before_quoted_text" /> android:text="@string/account_settings_signature__location_before_quoted_text"
android:contentDescription="@string/account_settings_signature__location_label" />
<RadioButton <RadioButton
android:id="@+id/account_signature_location_after_quoted_text" android:id="@+id/account_signature_location_after_quoted_text"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/account_settings_signature__location_after_quoted_text" /> android:text="@string/account_settings_signature__location_after_quoted_text"
android:contentDescription="@string/account_settings_signature__location_label" />
</RadioGroup> </RadioGroup>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -27,7 +27,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_username_label" />
<TextView <TextView
android:text="@string/account_setup_incoming_password_label" android:text="@string/account_setup_incoming_password_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -48,7 +49,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary" /> android:textColor="?android:attr/textColorPrimary"
android:contentDescription="@string/account_setup_incoming_password_label" />
<EditText <EditText
android:id="@+id/account_server" android:id="@+id/account_server"
android:singleLine="true" android:singleLine="true"
@ -64,7 +66,8 @@
<Spinner <Spinner
android:id="@+id/account_security_type" android:id="@+id/account_security_type"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_security_label" />
<TextView <TextView
android:id="@+id/account_auth_type_label" android:id="@+id/account_auth_type_label"
@ -74,9 +77,10 @@
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary" /> android:textColor="?android:attr/textColorPrimary" />
<Spinner <Spinner
android:id="@+id/account_auth_type" android:id="@+id/account_authtype"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_authtype_label" />
<TextView <TextView
android:text="@string/account_setup_incoming_port_label" android:text="@string/account_setup_incoming_port_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -88,7 +92,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="number" android:inputType="number"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_port_label" />
<LinearLayout <LinearLayout
android:id="@+id/imap_path_prefix_section" android:id="@+id/imap_path_prefix_section"
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -105,7 +110,8 @@
android:hint="@string/account_setup_incoming_imap_path_prefix_hint" android:hint="@string/account_setup_incoming_imap_path_prefix_hint"
android:singleLine="true" android:singleLine="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_imap_path_prefix_label" />
</LinearLayout> </LinearLayout>
<LinearLayout android:layout_width="fill_parent" <LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:id="@+id/imap_folder_setup_section" android:layout_height="wrap_content" android:id="@+id/imap_folder_setup_section"
@ -119,12 +125,14 @@
android:text="@string/account_setup_incoming_imap_folder_drafts" android:text="@string/account_setup_incoming_imap_folder_drafts"
android:layout_width="fill_parent"></TextView> android:layout_width="fill_parent"></TextView>
<Button android:layout_height="wrap_content" <Button android:layout_height="wrap_content"
android:id="@+id/account_imap_folder_drafts" android:layout_width="fill_parent"></Button> android:id="@+id/account_imap_folder_drafts" android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_imap_folder_drafts"></Button>
<TextView android:layout_height="wrap_content" <TextView android:layout_height="wrap_content"
android:text="@string/account_setup_incoming_imap_folder_sent" android:text="@string/account_setup_incoming_imap_folder_sent"
android:layout_width="fill_parent"></TextView> android:layout_width="fill_parent"></TextView>
<Button android:layout_height="wrap_content" <Button android:layout_height="wrap_content"
android:id="@+id/account_imap_folder_sent" android:layout_width="fill_parent"></Button> android:id="@+id/account_imap_folder_sent" android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_imap_folder_sent"></Button>
<TextView android:layout_height="wrap_content" <TextView android:layout_height="wrap_content"
android:text="@string/account_setup_incoming_imap_folder_spam" android:text="@string/account_setup_incoming_imap_folder_spam"
android:layout_width="fill_parent"></TextView> android:layout_width="fill_parent"></TextView>
@ -134,7 +142,8 @@
android:text="@string/account_setup_incoming_imap_folder_trash" android:text="@string/account_setup_incoming_imap_folder_trash"
android:layout_width="fill_parent"></TextView> android:layout_width="fill_parent"></TextView>
<Button android:layout_height="wrap_content" <Button android:layout_height="wrap_content"
android:id="@+id/account_imap_folder_trash" android:layout_width="fill_parent"></Button> android:id="@+id/account_imap_folder_trash" android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_imap_folder_trash"></Button>
<TextView android:layout_height="wrap_content" <TextView android:layout_height="wrap_content"
android:text="@string/account_setup_incoming_imap_folder_outbox" android:text="@string/account_setup_incoming_imap_folder_outbox"
android:layout_width="fill_parent"></TextView> android:layout_width="fill_parent"></TextView>
@ -142,7 +151,8 @@
android:id="@+id/account_imap_folder_outbox" android:id="@+id/account_imap_folder_outbox"
android:singleLine="true" android:singleLine="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_imap_folder_outbox" />
<CheckBox <CheckBox
android:id="@+id/subscribed_folders_only" android:id="@+id/subscribed_folders_only"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -167,7 +177,8 @@
android:hint="@string/account_setup_incoming_imap_path_prefix_hint" android:hint="@string/account_setup_incoming_imap_path_prefix_hint"
android:singleLine="true" android:singleLine="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_webdav_path_prefix_label" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/webdav_path_debug_section" android:id="@+id/webdav_path_debug_section"
@ -185,7 +196,8 @@
android:hint="@string/account_setup_incoming_webdav_auth_path_hint" android:hint="@string/account_setup_incoming_webdav_auth_path_hint"
android:singleLine="true" android:singleLine="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_webdav_auth_path_label" />
<TextView <TextView
android:text="@string/account_setup_incoming_webdav_mailbox_path_label" android:text="@string/account_setup_incoming_webdav_mailbox_path_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -197,7 +209,8 @@
android:hint="@string/account_setup_incoming_webdav_mailbox_path_hint" android:hint="@string/account_setup_incoming_webdav_mailbox_path_hint"
android:singleLine="true" android:singleLine="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_incoming_webdav_mailbox_path_label" />
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/compression_label" android:id="@+id/compression_label"
@ -222,12 +235,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:text="@string/account_setup_incoming_wifi_label" android:text="@string/account_setup_incoming_wifi_label"
android:contentDescription="@string/account_setup_incoming_compression_label"
/> />
<CheckBox <CheckBox
android:id="@+id/compression_other" android:id="@+id/compression_other"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:text="@string/account_setup_incoming_other_label" android:text="@string/account_setup_incoming_other_label"
android:contentDescription="@string/account_setup_incoming_compression_label"
/> />
</LinearLayout> </LinearLayout>
<TextView <TextView
@ -270,6 +285,7 @@
android:id="@+id/idle_refresh_period" android:id="@+id/idle_refresh_period"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:contentDescription="@string/idle_refresh_period_label"
/> />
<TextView <TextView
android:id="@+id/account_setup_push_limit_label" android:id="@+id/account_setup_push_limit_label"
@ -282,6 +298,7 @@
android:id="@+id/folder_push_limit" android:id="@+id/folder_push_limit"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_push_limit_label"
/> />
<View <View

View File

@ -21,7 +21,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary" /> android:textColor="?android:attr/textColorPrimary"
android:focusable="true" />
<TextView <TextView
android:text="@string/account_setup_names_account_name_label" android:text="@string/account_setup_names_account_name_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -32,7 +33,8 @@
android:id="@+id/account_description" android:id="@+id/account_description"
android:singleLine="true" android:singleLine="true"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_names_account_name_label" />
<TextView <TextView
android:text="@string/account_setup_names_user_name_label" android:text="@string/account_setup_names_user_name_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -44,7 +46,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="textPersonName" android:inputType="textPersonName"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_names_user_name_label" />
<View <View
android:layout_height="0dip" android:layout_height="0dip"
android:layout_width="fill_parent" android:layout_width="fill_parent"

View File

@ -26,7 +26,8 @@
<Spinner <Spinner
android:id="@+id/account_check_frequency" android:id="@+id/account_check_frequency"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_options_mail_check_frequency_label" />
<CheckBox <CheckBox
android:id="@+id/account_enable_push" android:id="@+id/account_enable_push"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -44,7 +45,8 @@
<Spinner <Spinner
android:id="@+id/account_display_count" android:id="@+id/account_display_count"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_options_mail_display_count_label" />
<CheckBox <CheckBox
android:id="@+id/account_notify" android:id="@+id/account_notify"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -27,7 +27,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="textUri" android:inputType="textUri"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_outgoing_smtp_server_label" />
<TextView <TextView
android:text="@string/account_setup_outgoing_security_label" android:text="@string/account_setup_outgoing_security_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -37,7 +38,8 @@
<Spinner <Spinner
android:id="@+id/account_security_type" android:id="@+id/account_security_type"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_outgoing_security_label" />
<TextView <TextView
android:text="@string/account_setup_outgoing_port_label" android:text="@string/account_setup_outgoing_port_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -49,7 +51,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="number" android:inputType="number"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_outgoing_port_label" />
<CheckBox <CheckBox
android:id="@+id/account_require_login" android:id="@+id/account_require_login"
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -70,7 +73,8 @@
<Spinner <Spinner
android:id="@+id/account_auth_type" android:id="@+id/account_auth_type"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_outgoing_authentication_label" />
<TextView <TextView
android:text="@string/account_setup_outgoing_username_label" android:text="@string/account_setup_outgoing_username_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -82,7 +86,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="textEmailAddress" android:inputType="textEmailAddress"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_outgoing_username_label" />
<TextView <TextView
android:text="@string/account_setup_outgoing_password_label" android:text="@string/account_setup_outgoing_password_label"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -95,7 +100,8 @@
android:singleLine="true" android:singleLine="true"
android:inputType="textPassword" android:inputType="textPassword"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="fill_parent" /> android:layout_width="fill_parent"
android:contentDescription="@string/account_setup_outgoing_password_label" />
</LinearLayout> </LinearLayout>
<View <View
android:layout_width="fill_parent" android:layout_width="fill_parent"