Skip to content

Commit

Permalink
Merge pull request #1308 from benoit-pierre/improve_accessibility
Browse files Browse the repository at this point in the history
Improve accessibility
  • Loading branch information
benoit-pierre authored Oct 9, 2021
2 parents 99e3d54 + 247d4ea commit 7130177
Show file tree
Hide file tree
Showing 19 changed files with 1,266 additions and 719 deletions.
6 changes: 6 additions & 0 deletions news.d/feature/1308.ui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Improve accessibility:
- Disable tag-key navigation in tables, so focusing a table does not lock global tab-key navigation to it.
- Remove some container widget, tweak focus rules to avoid extra unnecessary steps when using tab-key navigation (like selecting the dictionaries widget outer frame).
- In form layouts, link each widget to its label (like each option in the configuration dialog).
- Set the accessible name / description of focusable widgets.
- Use lists for the dictionaries widget, suggestions widget, and the paper tape.
6 changes: 6 additions & 0 deletions news.d/feature/1332.ui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Improve accessibility:
- Disable tag-key navigation in tables, so focusing a table does not lock global tab-key navigation to it.
- Remove some container widget, tweak focus rules to avoid extra unnecessary steps when using tab-key navigation (like selecting the dictionaries widget outer frame).
- In form layouts, link each widget to its label (like each option in the configuration dialog).
- Set the accessible name / description of focusable widgets.
- Use lists for the dictionaries widget, suggestions widget, and the paper tape.
68 changes: 48 additions & 20 deletions plover/gui_qt/add_translation_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
</property>
<item>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Dictionary:</string>
</property>
<property name="buddy">
<cstring>dictionary</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="sizePolicy">
Expand All @@ -42,6 +52,9 @@
<property name="text">
<string>Strokes:</string>
</property>
<property name="buddy">
<cstring>strokes</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
Expand All @@ -52,6 +65,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="accessibleName">
<string>Strokes</string>
</property>
</widget>
</item>
<item row="2" column="0">
Expand All @@ -65,6 +81,9 @@
<property name="text">
<string>Translation:</string>
</property>
<property name="buddy">
<cstring>translation</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
Expand All @@ -75,17 +94,19 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Dictionary:</string>
<property name="accessibleName">
<string>Translation</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="dictionary">
<property name="accessibleName">
<string>Dictionary</string>
</property>
<property name="accessibleDescription">
<string>Select the target dictionary for the new translation.</string>
</property>
<property name="editable">
<bool>false</bool>
</property>
Expand All @@ -94,51 +115,58 @@
</layout>
</item>
<item>
<widget class="QLabel" name="strokes_info">
<widget class="QTextEdit" name="strokes_info">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="accessibleName">
<string>Existing mappings (strokes)</string>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
<property name="text" stdset="0">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="translation_info">
<widget class="QTextEdit" name="translation_info">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="accessibleName">
<string>Existing mappings (translations)</string>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
<property name="text" stdset="0">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>strokes</tabstop>
<tabstop>translation</tabstop>
<tabstop>strokes_info</tabstop>
<tabstop>translation_info</tabstop>
<tabstop>dictionary</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
Expand Down
15 changes: 14 additions & 1 deletion plover/gui_qt/config_file_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLineEdit" name="path"/>
<widget class="QLineEdit" name="path">
<property name="accessibleName">
<string>Log file path.</string>
</property>
<property name="accessibleDescription">
<string>Path to the log file.</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton">
Expand All @@ -31,6 +38,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="accessibleName">
<string>Browse.</string>
</property>
<property name="accessibleDescription">
<string>Open a file picker to select the log file.</string>
</property>
<property name="text">
<string>Browse</string>
</property>
Expand Down
Loading

0 comments on commit 7130177

Please sign in to comment.