From f6e1bb2d700750266365da1fcc31b1af26bb18cd Mon Sep 17 00:00:00 2001 From: Mike Gelfand Date: Sat, 14 Sep 2024 02:34:39 +0100 Subject: [PATCH] GTK client accessibility improvements (#7119) * Reformat GTK *.ui files Remove useless comments since we're mostly editing those files by hand now. Wrap multi-line text values in CDATA to avoid automated formatters changing whitespace there in any way. Collapse empty elements. * Switch from plain `GtkLabel`s to `GtkFrame`s for sections Frames are reported as groupings by assistive technologies. * Fix minor usability issues * Make value labels labelled and selectable --- gtk/transmission-ui.css | 13 + gtk/ui/gtk3/AddTrackerDialog.ui | 83 +- gtk/ui/gtk3/DetailsDialog.ui | 1486 +++++------ gtk/ui/gtk3/EditTrackersDialog.ui | 137 +- gtk/ui/gtk3/FilterBar.ui | 1 - gtk/ui/gtk3/MainWindow.ui | 1 - gtk/ui/gtk3/MakeDialog.ui | 613 +++-- gtk/ui/gtk3/MakeProgressDialog.ui | 1 - gtk/ui/gtk3/MessageLogWindow.ui | 1 - gtk/ui/gtk3/OptionsDialog.ui | 2 - gtk/ui/gtk3/PrefsDialog.ui | 3200 ++++++++++++------------ gtk/ui/gtk3/RelocateDialog.ui | 168 +- gtk/ui/gtk3/StatsDialog.ui | 538 ++-- gtk/ui/gtk3/TorrentUrlChooserDialog.ui | 91 +- gtk/ui/gtk4/AddTrackerDialog.ui | 62 +- gtk/ui/gtk4/DetailsDialog.ui | 1180 ++++----- gtk/ui/gtk4/EditTrackersDialog.ui | 100 +- gtk/ui/gtk4/MainWindow.ui | 4 +- gtk/ui/gtk4/MakeDialog.ui | 468 ++-- gtk/ui/gtk4/MessageLogWindow.ui | 4 +- gtk/ui/gtk4/OptionsDialog.ui | 2 +- gtk/ui/gtk4/PrefsDialog.ui | 2345 +++++++++-------- gtk/ui/gtk4/RelocateDialog.ui | 118 +- gtk/ui/gtk4/StatsDialog.ui | 437 ++-- gtk/ui/gtk4/TorrentListItemFull.ui | 2 +- gtk/ui/gtk4/TorrentUrlChooserDialog.ui | 62 +- 26 files changed, 5523 insertions(+), 5596 deletions(-) diff --git a/gtk/transmission-ui.css b/gtk/transmission-ui.css index a12a6d1ea..549b3fc83 100644 --- a/gtk/transmission-ui.css +++ b/gtk/transmission-ui.css @@ -82,3 +82,16 @@ row .tr-list-item.tr-transfer-idle progressbar progress { row:not(:selected) .tr-list-item.tr-error label { color: @tr_error_color; } + +frame, +frame border { + border-style: none; +} + +frame > grid { + margin: 6px 0 0 18px; +} + +frame + frame { + margin-top: 6px; +} diff --git a/gtk/ui/gtk3/AddTrackerDialog.ui b/gtk/ui/gtk3/AddTrackerDialog.ui index da46f3990..9a31dfe9f 100644 --- a/gtk/ui/gtk3/AddTrackerDialog.ui +++ b/gtk/ui/gtk3/AddTrackerDialog.ui @@ -1,5 +1,4 @@ - @@ -58,66 +57,64 @@ vertical 6 - + True False - Tracker - 0 - - - - - - False - True - 0 - - - - - - True - False - 18 - 6 - 12 - - + + True False - _Announce URL: - True - url_entry + Tracker + + + - - 0 - 0 - - - 400 + True - True - True + False + 6 + 12 + + + True + False + _Announce URL: + True + url_entry + + + 0 + 0 + + + + + 400 + True + True + True + + + 1 + 0 + + - 1 - 0 + False + True + 1 - - False - True - 1 - False True - 1 + 0 diff --git a/gtk/ui/gtk3/DetailsDialog.ui b/gtk/ui/gtk3/DetailsDialog.ui index cea871feb..75cc3af7c 100644 --- a/gtk/ui/gtk3/DetailsDialog.ui +++ b/gtk/ui/gtk3/DetailsDialog.ui @@ -1,5 +1,4 @@ - @@ -49,15 +48,292 @@ vertical 6 - + True False - True - Activity - 0 - - - + + + True + False + Activity + + + + + + + + True + False + 6 + 12 + + + True + False + Torrent size: + 0 + + + 0 + 0 + + + + + True + False + Have: + 0 + + + 0 + 1 + + + + + True + False + Uploaded: + 0 + + + 0 + 2 + + + + + True + False + Downloaded: + 0 + + + 0 + 3 + + + + + True + False + State: + 0 + + + 0 + 4 + + + + + True + False + Running time: + 0 + + + 0 + 5 + + + + + True + False + Remaining time: + 0 + + + 0 + 6 + + + + + True + False + Last activity: + 0 + + + 0 + 7 + + + + + True + False + Error: + 0 + 0 + + + 0 + 8 + + + + + True + True + True + ... + True + 0 + + + + + + 1 + 0 + + + + + True + True + True + ... + True + 0 + + + + + + 1 + 1 + + + + + True + True + True + ... + True + 0 + + + + + + 1 + 2 + + + + + True + True + True + ... + True + 0 + + + + + + 1 + 3 + + + + + True + True + True + ... + True + 0 + + + + + + 1 + 4 + + + + + True + True + True + ... + True + 0 + + + + + + 1 + 5 + + + + + True + True + True + ... + True + 0 + + + + + + 1 + 6 + + + + + True + True + True + ... + True + 0 + + + + + + 1 + 7 + + + + + True + True + True + ... + True + True + end + 10 + 0 + + + + + + 1 + 8 + + + + False @@ -66,242 +342,209 @@ - - + True False - 18 - 6 - 12 - - + + True False - Torrent size: - 0 + Details + + + - - 0 - 0 - - + True False - Have: - 0 + 6 + 12 + + + True + False + Location: + 0 + + + 0 + 0 + + + + + True + False + Hash: + 0 + + + 0 + 1 + + + + + True + False + Privacy: + 0 + + + 0 + 2 + + + + + True + False + Origin: + 0 + + + 0 + 3 + + + + + True + False + Added: + 0 + + + 0 + 4 + + + + + True + False + 6 + 6 + Comment: + True + comment_value_view + 0 + 0 + + + 0 + 5 + + + + + True + True + ... + True + end + 0 + + + + + + 1 + 0 + + + + + True + True + ... + True + end + 0 + + + + + + 1 + 1 + + + + + True + True + ... + True + 0 + + + + + + 1 + 2 + + + + + True + True + ... + True + end + 0 + + + + + + 1 + 3 + + + + + True + True + ... + True + 0 + + + + + + 1 + 4 + + + + + 350 + 36 + True + True + True + True + in + + + True + True + False + word + + + + + 1 + 5 + + - - 0 - 1 - - - - - True - False - Uploaded: - 0 - - - 0 - 2 - - - - - True - False - Downloaded: - 0 - - - 0 - 3 - - - - - True - False - State: - 0 - - - 0 - 4 - - - - - True - False - Running time: - 0 - - - 0 - 5 - - - - - True - False - Remaining time: - 0 - - - 0 - 6 - - - - - True - False - Last activity: - 0 - - - 0 - 7 - - - - - True - False - Error: - 0 - 0 - - - 0 - 8 - - - - - True - False - True - ... - 0 - - - 1 - 0 - - - - - True - False - True - ... - 0 - - - 1 - 1 - - - - - True - False - True - ... - 0 - - - 1 - 2 - - - - - True - False - True - ... - 0 - - - 1 - 3 - - - - - True - False - True - ... - 0 - - - 1 - 4 - - - - - True - False - True - ... - 0 - - - 1 - 5 - - - - - True - False - True - ... - 0 - - - 1 - 6 - - - - - True - False - True - ... - 0 - - - 1 - 7 - - - - - True - False - True - ... - True - True - end - 10 - 0 - - - 1 - 8 - @@ -310,214 +553,6 @@ 1 - - - 6 - True - False - - - False - True - 2 - - - - - True - False - True - Details - 0 - - - - - - False - True - 3 - - - - - - True - False - 18 - 6 - 12 - - - True - False - Location: - 0 - - - 0 - 0 - - - - - True - False - Hash: - 0 - - - 0 - 1 - - - - - True - False - Privacy: - 0 - - - 0 - 2 - - - - - True - False - Origin: - 0 - - - 0 - 3 - - - - - True - False - Added: - 0 - - - 0 - 4 - - - - - True - False - 6 - 6 - Comment: - 0 - 0 - - - 0 - 5 - - - - - True - False - ... - True - end - 0 - - - 1 - 0 - - - - - True - False - ... - True - end - 0 - - - 1 - 1 - - - - - True - False - ... - 0 - - - 1 - 2 - - - - - True - False - ... - True - end - 0 - - - 1 - 3 - - - - - True - False - ... - 0 - - - 1 - 4 - - - - - 350 - 36 - True - True - True - True - in - - - True - True - False - word - - - - - 1 - 5 - - - - - False - True - 4 - - @@ -828,15 +863,122 @@ vertical 6 - + True False - True - Speed - 0 - - - + + + True + False + Speed + + + + + + + + True + False + 6 + 12 + + + Honor global _limits + True + True + False + center + True + True + + + 0 + 0 + 2 + + + + + Limit _download speed ({speed_units}): + True + True + False + center + True + True + + + 0 + 1 + + + + + Limit _upload speed ({speed_units}): + True + True + False + center + True + True + + + 0 + 2 + + + + + True + False + Torrent _priority: + True + priority_combo + 0 + + + 0 + 3 + + + + + True + False + True + True + + + 1 + 1 + + + + + True + False + True + True + + + 1 + 2 + + + + + True + False + True + + + 1 + 3 + + + + False @@ -845,107 +987,125 @@ - - + True False - 18 - 6 - 12 - - - Honor global _limits - True - True - False - center - True - True - - - 0 - 0 - 2 - - - - - Limit _download speed ({speed_units}): - True - True - False - center - True - True - - - 0 - 1 - - - - - Limit _upload speed ({speed_units}): - True - True - False - center - True - True - - - 0 - 2 - - - - + + True False - Torrent _priority: - True - priority_combo - 0 + Seeding Limits + + + - - 0 - 3 - - - True - False - True - True - - - 1 - 1 - - - - - True - False - True - True - - - 1 - 2 - - - - + True False - True + 6 + 12 + + + True + False + _Ratio: + True + ratio_limit_combo + 0 + + + 0 + 0 + + + + + True + False + _Idle: + True + idle_limit_combo + 0 + + + 0 + 1 + + + + + True + False + True + 6 + + + True + False + True + + + False + True + 0 + + + + + True + True + 7 + + + False + True + 1 + + + + + 1 + 0 + + + + + True + False + True + 6 + + + True + False + True + + + False + True + 0 + + + + + True + True + + + False + True + 1 + + + + + 1 + 1 + + - - 1 - 3 - @@ -955,10 +1115,52 @@ - - 6 + True False + + + True + False + Peer Connections + + + + + + + + True + False + 6 + 12 + + + True + False + _Maximum peers: + True + max_peers_spin + 0 + + + 0 + 0 + + + + + True + True + True + + + 1 + 0 + + + + False @@ -966,206 +1168,6 @@ 2 - - - True - False - True - Seeding Limits - 0 - - - - - - False - True - 3 - - - - - - True - False - 18 - 6 - 12 - - - True - False - _Ratio: - True - ratio_limit_combo - 0 - - - 0 - 0 - - - - - True - False - _Idle: - True - idle_limit_combo - 0 - - - 0 - 1 - - - - - True - False - True - 6 - - - True - False - True - - - False - True - 0 - - - - - True - True - 7 - - - False - True - 1 - - - - - 1 - 0 - - - - - True - False - True - 6 - - - True - False - True - - - False - True - 0 - - - - - True - True - - - False - True - 1 - - - - - 1 - 1 - - - - - False - True - 4 - - - - - 6 - True - False - - - False - True - 5 - - - - - True - False - True - Peer Connections - 0 - - - - - - False - True - 6 - - - - - - True - False - 18 - 6 - 12 - - - True - False - _Maximum peers: - True - max_peers_spin - 0 - - - 0 - 0 - - - - - True - True - True - - - 1 - 0 - - - - - False - True - 7 - - 4 diff --git a/gtk/ui/gtk3/EditTrackersDialog.ui b/gtk/ui/gtk3/EditTrackersDialog.ui index 82b99d300..476ff8cee 100644 --- a/gtk/ui/gtk3/EditTrackersDialog.ui +++ b/gtk/ui/gtk3/EditTrackersDialog.ui @@ -1,5 +1,4 @@ - @@ -58,14 +57,75 @@ vertical 6 - + True False - Tracker Announce URLs - 0 - - - + + + True + False + Tracker Announce URLs + + + + + + + + True + False + 6 + 12 + + + True + False + + 0 + + + 0 + 0 + 2 + + + + + 500 + 166 + True + True + in + + + True + True + False + + + + + 0 + 1 + 2 + + + + + True + False + Also see Default Public Trackers in Edit > Preferences > Network + 0 + + + 0 + 2 + 2 + + + + False @@ -73,69 +133,6 @@ 0 - - - - True - False - 18 - 6 - 12 - - - True - False - To add a backup URL, add it on the next line after a primary URL. -To add a new primary URL, add it after a blank line. - 0 - - - 0 - 0 - 2 - - - - - 500 - 166 - True - True - in - - - True - True - False - - - - - 0 - 1 - 2 - - - - - True - False - Also see Default Public Trackers in Edit > Preferences > Network - 0 - - - 0 - 2 - 2 - - - - - False - True - 1 - - False diff --git a/gtk/ui/gtk3/FilterBar.ui b/gtk/ui/gtk3/FilterBar.ui index 37044d130..132673430 100644 --- a/gtk/ui/gtk3/FilterBar.ui +++ b/gtk/ui/gtk3/FilterBar.ui @@ -1,5 +1,4 @@ -