Xamarin 應用程式中的協助工具Accessibility in Xamarin Apps

確保您的應用程式可供最廣泛的可能物件使用Ensure that your apps are useable by the widest possible audience

協助工具是設計應用程式使用者介面的概念,可運作良好的作業系統顯示和輸入協助功能,例如大型類型、高對比、放大、螢幕閱讀(文字轉換語音)、視覺效果或 haptic 意見反應提示,以及替代的輸入法。Accessibility refers to the concept of designing app user interfaces that work well operating system display- and input-assistance features such as large type, high contrast, zoom in, screen reading (text-to-speech), visual or haptic feedback cues, and alternative input methods.

IOS、Android 和 Windows 等桌面和行動平臺提供內建的 Api,可協助開發人員建立可存取的應用程式,例如Google TalkBackApple 的 VoiceOverDesktop and mobile platforms like iOS, Android, and Windows provide built in APIs that help developers build accessible apps, such as Google TalkBack and Apple's VoiceOver.

平臺特定 ApiPlatform-Specific APIs

若要執行本檔中的指導方針,請使用每個平臺提供的 Api:To implement the guidelines in this document, use the APIs provided by each platform:

協助工具檢查清單Accessibility Checklist

請遵循這些秘訣,以確保您的應用程式可供最廣泛的物件存取。Follow these tips to ensure that your apps are accessible to the widest audience possible. 如需其他資訊,請參閱Android 輔助功能測試檢查清單Apple 的協助工具頁面Check out the Android Accessibility Testing Checklist and Apple's Accessibility page for additional information.

支援大型字型和高對比Support large fonts and high contrast

請避免硬式編碼控制項維度,而是偏好可以調整大小以容納較大字型大小的版面配置。Avoid hardcoding control dimensions and, instead, prefer layouts that can resize to accommodate larger font sizes. 在高對比模式中測試色彩配置,以確保它們可讀取。Test color schemes in high-contrast mode to ensure that they are readable.

讓使用者介面自我描述Make the user interface self-describing

使用與每個平臺上的螢幕讀取 Api 相容的描述性文字和提示,標記使用者介面的所有元素。Tag all the elements of your user-interface with descriptive text and hints that are compatible with the screen reading APIs on each platform.

確定影像和圖示具有替代的文字描述Ensure that images and icons have an alternate text description

屬於應用程式使用者介面(例如,按鈕或狀態指示器)一部分的影像和圖示應該以可存取的描述標記。Images and icons that are part of the application user interface (such as buttons or indicators of status, for example) should be tagged with an accessible description.

設計視覺化樹狀結構並記住可存取的導覽Design the visual tree with accessible navigation in mind

使用適當的版面配置控制項或 Api,以便使用替代輸入方法在控制項之間流覽,遵循與使用觸控式螢幕相同的邏輯流程。Use appropriate layout controls or APIs so that navigating between controls using alternate input methods follows the same logical flow as using the touch screen.

從螢幕閱讀程式排除不必要的元素(例如,已可存取的欄位的裝飾影像或標籤)。Exclude unnecessary elements from screen readers (decorative images or labels for fields that are already accessible, for example).

不要單獨依賴音訊或色彩提示Don't rely on audio or color cues alone

避免只有進度、完成或其他狀態的唯一指示是音效或色彩變更的情況。Avoid situations where the sole indication of progress, completion, or some other state is a sound or color-change. 請設計使用者介面,以包含明確的視覺提示(僅限增強式的音效和色彩),或加入特定的協助工具指標。Either design the user interface to include clear visual cues (with sound and color for reinforcement only), or add specific accessibility indicators.

選擇色彩時,請試著避免難以區分顏色的色板。When choosing colors, try to avoid a palette that is hard to distinguish for users with color blindness.

影片的字幕、音訊文字Captioning for video, text for audio

提供影片內容的標題,以及音訊內容的可讀取腳本。Provide captions for video content, and a readable script for audio content. 提供調整音訊或影片內容速度的控制項也很有説明,並確保音量和播放/暫停按鈕易於尋找和使用。It's also helpful to provide controls that adjust the speed of audio or video content, and ensure that volume and play/pause buttons are easy to find and use.

LocalizeLocalize

協助工具描述可以(且應該)當地語系化,其中應用程式支援多種語言。Accessibility descriptions can (and should) be localized where the application supports multiple languages.