可访问性

介绍

软件开发中的可访问性,旨在使软件可用于所有能力人。包括的这些人具有

  • 视力受损
  • 运动困难
  • 认知损伤 (或学习残疾)
  • 耳聋 (或听力受损)

Qt 旨在支持您编写的可访问软件。让我们来看看这方面的常见主题,及 Qt 如何可用帮您使软件可访问。

可伸缩 UI

Allow your application’s user interface to work in different sizes, resolutions, and form factors. Also, allow the user to customize fonts and font sizes.

Qt supports you by providing a sophisticated layout system that dynamically scales your user interface. Qt widgets and controls, by default, also use fonts and font sizes configured in the operating system.

键盘导航

Do not rely solely on a computer mouse or touch as input but also allow navigation by a keyboard. Define keyboard shortcuts for often used functionality.

Qt enables keyboard focus and navigation for Qt Widgets and Qt Quick and makes it easy to configure global or local keyboard shortcuts. Qt Virtual Keyboard allows you to show an on-screen keyboard.

颜色 & 颜色对比度

Provide enough contrast in your UI and consider the most common cases of color blindness. Support different color schemes in your application, or respect colors and themes as configured in the operating system. Do not depend on colors only to provide information.

Qt widgets and controls do adhere to the system color palette by default. For embedded software, styles allow you to create high-contrast themes.

声音 & 语音

In addition to allowing visual interaction with your application, consider sound notifications or speech input and output. Do not exclusively rely on sound notifications though.

Qt Multimedia allows you to play sounds, and Qt TextToSpeech allows you to read out texts with a synthesized voice.

辅助工具

Allow your application to be used via assistive tools like screen readers and braille displays.

Qt does use platform-specific APIs to expose the semantic structure of your GUI to such tools. The ready-made widgets and controls also provide enough metadata to be usable, and custom widgets and controls can expose and enhance this data, too. See QWidget 应用程序的可访问性 and Qt Quick 应用程序的可访问性 了解更多细节。