Skip to content

Commit

Permalink
FIX(a11y): Improve accessible names and descriptions of AudioInput se…
Browse files Browse the repository at this point in the history
…ttings page
  • Loading branch information
Hartmnt committed Jan 2, 2024
1 parent d887fec commit 2d69a14
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 11 deletions.
13 changes: 5 additions & 8 deletions src/mumble/AudioConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,10 @@ AudioInputDialog::AudioInputDialog(Settings &st) : ConfigWidget(st) {
qsPTTHold->setAccessibleName(tr("PTT hold threshold"));
qsTransmitHold->setAccessibleName(tr("Silence below"));
abSpeech->setAccessibleName(tr("Current speech detection chance"));
qsTransmitMin->setAccessibleName(tr("Speech above"));
qsTransmitMax->setAccessibleName(tr("Speech below"));
qsFrames->setAccessibleName(tr("Audio per packet"));
qsQuality->setAccessibleName(tr("Quality of compression (peak bandwidth)"));
qsTransmitMin->setAccessibleName(tr("Silence below"));
qsTransmitMax->setAccessibleName(tr("Speech above"));
qsSpeexNoiseSupStrength->setAccessibleName(tr("Noise suppression"));
qsAmp->setAccessibleName(tr("Maximum amplification"));
qlePushClickPathOn->setAccessibleName(tr("Transmission started sound"));
qlePushClickPathOff->setAccessibleName(tr("Transmission stopped sound"));
qsbIdle->setAccessibleName(tr("Initiate idle action after (in minutes)"));
qcbIdleAction->setAccessibleName(tr("Idle action"));
qlInputHelp->setVisible(false);

if (AudioInputRegistrar::qmNew) {
Expand Down Expand Up @@ -386,6 +380,9 @@ void AudioInputDialog::updateBitrate() {
qlBitrate->setText(v);

qsQuality->setMinimum(8000);

qsQuality->setAccessibleDescription(v);
qsFrames->setAccessibleDescription(v);
}

void AudioInputDialog::on_qcbEnableCuePTT_clicked() {
Expand Down
49 changes: 46 additions & 3 deletions src/mumble/AudioInput.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>711</width>
<width>705</width>
<height>1012</height>
</rect>
</property>
Expand Down Expand Up @@ -466,6 +466,9 @@
<property name="whatsThis">
<string>&lt;b&gt;This selects how many audio frames should be put in one packet.&lt;/b&gt;&lt;br /&gt;Increasing this will increase the latency of your voice, but will also reduce bandwidth requirements.</string>
</property>
<property name="accessibleName">
<string>Audio per packet in milliseconds</string>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand Down Expand Up @@ -514,6 +517,9 @@
<property name="whatsThis">
<string>&lt;b&gt;This sets the quality of compression.&lt;/b&gt;&lt;br /&gt;This determines how much bandwidth Mumble is allowed to use for outgoing audio.</string>
</property>
<property name="accessibleName">
<string>Audio compression quality in kilobit per second</string>
</property>
<property name="minimum">
<number>8000</number>
</property>
Expand Down Expand Up @@ -595,6 +601,9 @@
<property name="whatsThis">
<string>&lt;b&gt;Maximum amplification of input.&lt;/b&gt;&lt;br /&gt;Mumble normalizes the input volume before compressing, and this sets how much it's allowed to amplify.&lt;br /&gt;The actual level is continually updated based on your current speech pattern, but it will never go above the level specified here.&lt;br /&gt;If the &lt;i&gt;Microphone loudness&lt;/i&gt; level of the audio statistics hover around 100%, you probably want to set this to 2.0 or so, but if, like most people, you are unable to reach 100%, set this to something much higher.&lt;br /&gt;Ideally, set it so &lt;i&gt;Microphone Loudness * Amplification Factor &gt;= 100&lt;/i&gt;, even when you're speaking really soft.&lt;br /&gt;&lt;br /&gt;Note that there is no harm in setting this to maximum, but Mumble will start picking up other conversations if you leave it to auto-tune to that level.</string>
</property>
<property name="accessibleName">
<string>Maximum amplification</string>
</property>
<property name="maximum">
<number>19500</number>
</property>
Expand Down Expand Up @@ -644,6 +653,9 @@
</item>
<item row="4" column="0" colspan="3">
<widget class="QGroupBox" name="groupBox">
<property name="accessibleName">
<string>Noise suppression</string>
</property>
<property name="title">
<string>Noise suppression</string>
</property>
Expand All @@ -655,6 +667,9 @@
<property name="toolTip">
<string>Don't use noise suppression.</string>
</property>
<property name="accessibleName">
<string>Noise suppression disabled</string>
</property>
<property name="text">
<string>Disabled</string>
</property>
Expand Down Expand Up @@ -777,6 +792,9 @@
<property name="toolTip">
<string>Gets played when stopping to transmit</string>
</property>
<property name="accessibleDescription">
<string>Path to audio cue file when stopping to speak</string>
</property>
</widget>
</item>
<item row="4" column="4">
Expand Down Expand Up @@ -809,6 +827,12 @@
</item>
<item>
<widget class="MUComboBox" name="qcbIdleAction">
<property name="accessibleName">
<string>Idle action</string>
</property>
<property name="accessibleDescription">
<string>Select what to do when being idle for a configurable amount of time. Default: nothing</string>
</property>
<item>
<property name="text">
<string>nothing</string>
Expand Down Expand Up @@ -842,10 +866,20 @@
</layout>
</item>
<item row="3" column="4">
<widget class="QLineEdit" name="qleMuteCuePath"/>
<widget class="QLineEdit" name="qleMuteCuePath">
<property name="toolTip">
<string>Gets played when you are trying to speak while being muted</string>
</property>
<property name="accessibleDescription">
<string>Path to mute cue file</string>
</property>
</widget>
</item>
<item row="3" column="5">
<widget class="QPushButton" name="qpbMuteCueBrowse">
<property name="toolTip">
<string>Browse for mute cue audio file</string>
</property>
<property name="text">
<string>Br&amp;owse...</string>
</property>
Expand All @@ -856,6 +890,9 @@
<property name="toolTip">
<string>Gets played when starting to transmit</string>
</property>
<property name="accessibleDescription">
<string>Path to audio cue file when starting to speak</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
Expand Down Expand Up @@ -897,6 +934,9 @@
</item>
<item row="3" column="6">
<widget class="QPushButton" name="qpbMuteCuePreview">
<property name="toolTip">
<string>Preview the mute cue</string>
</property>
<property name="text">
<string>Pre&amp;view</string>
</property>
Expand Down Expand Up @@ -924,6 +964,9 @@
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="qcbMuteCue">
<property name="accessibleDescription">
<string>The mute cue is an audio sample which plays when you are trying to speak while being muted</string>
</property>
<property name="text">
<string>Mute cue</string>
</property>
Expand All @@ -942,7 +985,7 @@
<item row="1" column="6">
<widget class="QPushButton" name="qpbPushClickPreview">
<property name="toolTip">
<string>Preview the audio cues</string>
<string>Preview both audio cues</string>
</property>
<property name="whatsThis">
<string>&lt;b&gt;Preview&lt;/b&gt;&lt;br/&gt;Plays the current &lt;i&gt;on&lt;/i&gt; sound followed by the current &lt;i&gt;off&lt;/i&gt; sound.</string>
Expand Down

0 comments on commit 2d69a14

Please sign in to comment.