Skip to content

Commit

Permalink
FIX(a11y): Move all accessible name definitions into XML where applic…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
Hartmnt committed Jan 3, 2024
1 parent a5b5173 commit 5110717
Show file tree
Hide file tree
Showing 42 changed files with 377 additions and 161 deletions.
32 changes: 0 additions & 32 deletions src/mumble/ACLEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,6 @@ ACLEditor::ACLEditor(int channelparentid, QWidget *p) : QDialog(p) {

setupUi(this);

qwChannel->setAccessibleName(tr("Properties"));
rteChannelDescription->setAccessibleName(tr("Description"));
qleChannelPassword->setAccessibleName(tr("Channel password"));
qsbChannelPosition->setAccessibleName(tr("Position"));
qsbChannelMaxUsers->setAccessibleName(tr("Maximum users"));
qleChannelName->setAccessibleName(tr("Channel name"));
qcbGroupList->setAccessibleName(tr("List of groups"));
qlwGroupAdd->setAccessibleName(tr("Inherited group members"));
qlwGroupRemove->setAccessibleName(tr("Foreign group members"));
qlwGroupInherit->setAccessibleName(tr("Inherited channel members"));
qcbGroupAdd->setAccessibleName(tr("Add members to group"));
qcbGroupRemove->setAccessibleName(tr("Remove member from group"));
qlwACLs->setAccessibleName(tr("List of ACL entries"));
qcbACLGroup->setAccessibleName(tr("Group this entry applies to"));
qcbACLUser->setAccessibleName(tr("User this entry applies to"));

qsbChannelPosition->setRange(INT_MIN, INT_MAX);

setWindowTitle(tr("Mumble - Add channel"));
Expand Down Expand Up @@ -93,22 +77,6 @@ ACLEditor::ACLEditor(int channelid, const MumbleProto::ACL &mea, QWidget *p) : Q

setupUi(this);

qwChannel->setAccessibleName(tr("Properties"));
rteChannelDescription->setAccessibleName(tr("Description"));
qleChannelPassword->setAccessibleName(tr("Channel password"));
qsbChannelPosition->setAccessibleName(tr("Position"));
qsbChannelMaxUsers->setAccessibleName(tr("Maximum users"));
qleChannelName->setAccessibleName(tr("Channel name"));
qcbGroupList->setAccessibleName(tr("List of groups"));
qlwGroupAdd->setAccessibleName(tr("Inherited group members"));
qlwGroupRemove->setAccessibleName(tr("Foreign group members"));
qlwGroupInherit->setAccessibleName(tr("Inherited channel members"));
qcbGroupAdd->setAccessibleName(tr("Add members to group"));
qcbGroupRemove->setAccessibleName(tr("Remove member from group"));
qlwACLs->setAccessibleName(tr("List of ACL entries"));
qcbACLGroup->setAccessibleName(tr("Group this entry applies to"));
qcbACLUser->setAccessibleName(tr("User this entry applies to"));

qcbChannelTemporary->hide();

iId = mea.channel_id();
Expand Down
45 changes: 45 additions & 0 deletions src/mumble/ACLEditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<number>1</number>
</property>
<widget class="QWidget" name="qwChannel">
<property name="accessibleName">
<string>Properties</string>
</property>
<attribute name="title">
<string>&amp;Properties</string>
</attribute>
Expand All @@ -45,6 +48,9 @@
<property name="whatsThis">
<string>&lt;b&gt;Password&lt;/b&gt;&lt;br /&gt;This field allows you to easily set and change the password of a channel. It uses Mumble's access tokens feature in the background. Use ACLs and groups if you need more fine grained and powerful access control.</string>
</property>
<property name="accessibleName">
<string>Channel password</string>
</property>
</widget>
</item>
<item row="7" column="0">
Expand Down Expand Up @@ -72,6 +78,9 @@
<string>&lt;b&gt;Position&lt;/b&gt;&lt;br/&gt;
This value enables you to change the way Mumble arranges the channels in the tree. A channel with a higher &lt;i&gt;Position&lt;/i&gt; value will always be placed below one with a lower value and the other way around. If the &lt;i&gt;Position&lt;/i&gt; value of two channels is equal they will get sorted alphabetically by their name.</string>
</property>
<property name="accessibleName">
<string>Position</string>
</property>
<property name="maximum">
<number>99</number>
</property>
Expand Down Expand Up @@ -102,6 +111,9 @@ This value enables you to change the way Mumble arranges the channels in the tre
<string>&lt;b&gt;Maximum Users&lt;/b&gt;&lt;br /&gt;
This value allows you to set the maximum number of users allowed in the channel. If the value is above zero, only that number of users will be allowed to enter the channel. If the value is zero, the maximum number of users in the channel is given by the server's default limit.</string>
</property>
<property name="accessibleName">
<string>Maximum users</string>
</property>
</widget>
</item>
<item row="10" column="1">
Expand All @@ -128,6 +140,9 @@ When checked the channel created will be marked as temporary. This means when th
<property name="whatsThis">
<string>&lt;b&gt;Name&lt;/b&gt;&lt;br /&gt;Enter the channel name in this field. The name has to comply with the restriction imposed by the server you are connected to.</string>
</property>
<property name="accessibleName">
<string>Channel name</string>
</property>
</widget>
</item>
<item>
Expand Down Expand Up @@ -160,6 +175,9 @@ When checked the channel created will be marked as temporary. This means when th
<verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="accessibleName">
<string>Description</string>
</property>
</widget>
</item>
<item row="4" column="0">
Expand Down Expand Up @@ -212,6 +230,9 @@ When checked the channel created will be marked as temporary. This means when th
<string>&lt;b&gt;Group&lt;/b&gt;&lt;br /&gt;
These are all the groups currently defined for the channel. To create a new group, just type in the name and press enter.</string>
</property>
<property name="accessibleName">
<string>List of groups</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
Expand Down Expand Up @@ -335,6 +356,9 @@ Add a new group.</string>
<string>&lt;b&gt;Members&lt;/b&gt;&lt;br /&gt;
This list contains all members that were added to the group by the current channel. Be aware that this does not include members inherited by higher levels of the channel tree. These can be found in the &lt;i&gt;Inherited members&lt;/i&gt; list. To prevent this list to be inherited by lower level channels uncheck &lt;i&gt;Inheritable&lt;/i&gt; or manually add the members to the &lt;i&gt;Excluded members&lt;/i&gt; list.</string>
</property>
<property name="accessibleName">
<string>Inherited group members</string>
</property>
</widget>
</item>
<item row="2" column="0">
Expand All @@ -351,6 +375,9 @@ This list contains all members that were added to the group by the current chann
<property name="whatsThis">
<string>Type in the name of a user you wish to add to the group and click Add.</string>
</property>
<property name="accessibleName">
<string>Add members to group</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
Expand Down Expand Up @@ -413,6 +440,9 @@ This list contains all members that were added to the group by the current chann
<string>&lt;b&gt;Excluded members&lt;/b&gt;&lt;br /&gt;
Contains a list of members whose group membership will not be inherited from the parent channel.</string>
</property>
<property name="accessibleName">
<string>Foreign group members</string>
</property>
</widget>
</item>
<item row="2" column="0">
Expand All @@ -429,6 +459,9 @@ Contains a list of members whose group membership will not be inherited from the
<property name="whatsThis">
<string>Type in the name of a user you wish to remove from the group and click Add.</string>
</property>
<property name="accessibleName">
<string>Remove member from group</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
Expand Down Expand Up @@ -501,6 +534,9 @@ Contains a list of members whose group membership will not be inherited from the
<string>&lt;b&gt;Inherited members&lt;/b&gt;&lt;br /&gt;
Contains the list of members inherited by the current channel. Uncheck &lt;i&gt;Inherit&lt;/i&gt; to prevent inheritance from higher level channels.</string>
</property>
<property name="accessibleName">
<string>Inherited channel members</string>
</property>
</widget>
</item>
<item row="2" column="0">
Expand Down Expand Up @@ -539,6 +575,9 @@ Contains the list of members inherited by the current channel. Uncheck &lt;i&gt;
<property name="whatsThis">
<string>This shows all the entries active on this channel. Entries inherited from parent channels will be shown in italics.&lt;br /&gt;ACLs are evaluated top to bottom, meaning priority increases as you move down the list.</string>
</property>
<property name="accessibleName">
<string>List of ACL entries</string>
</property>
</widget>
</item>
<item row="2" column="0">
Expand Down Expand Up @@ -698,6 +737,9 @@ Contains the list of members inherited by the current channel. Uncheck &lt;i&gt;
<property name="whatsThis">
<string>This controls which group of users this entry applies to.&lt;br /&gt;Note that the group is evaluated in the context of the channel the entry is used in. For example, the default ACL on the Root channel gives &lt;i&gt;Write&lt;/i&gt; permission to the &lt;i&gt;admin&lt;/i&gt; group. This entry, if inherited by a channel, will give a user write privileges if he belongs to the &lt;i&gt;admin&lt;/i&gt; group in that channel, even if he doesn't belong to the &lt;i&gt;admin&lt;/i&gt; group in the channel where the ACL originated.&lt;br /&gt;If a group name starts with '!', its membership is negated, and if it starts with '~', it is evaluated in the channel the ACL was defined in, rather than the channel the ACL is active in.&lt;br /&gt;If a group name starts with '#', it is interpreted as an access token. Users must have entered whatever follows the '#' in their list of access tokens to match. This can be used for very simple password access to channels for non-authenticated users.&lt;br /&gt;If a group name starts with '$', it will only match users whose certificate hash matches what follows the '$'.&lt;br /&gt;A few special predefined groups are:&lt;br /&gt;&lt;b&gt;all&lt;/b&gt; - Everyone will match.&lt;br /&gt;&lt;b&gt;auth&lt;/b&gt; - All authenticated users will match.&lt;br /&gt;&lt;b&gt;sub,a,b,c&lt;/b&gt; - User currently in a sub-channel minimum &lt;i&gt;a&lt;/i&gt; common parents, and between &lt;i&gt;b&lt;/i&gt; and &lt;i&gt;c&lt;/i&gt; channels down the chain. See the website for more extensive documentation on this one.&lt;br /&gt;&lt;b&gt;in&lt;/b&gt; - Users currently in the channel will match (convenience for '&lt;i&gt;sub,0,0,0&lt;/i&gt;').&lt;br /&gt;&lt;b&gt;out&lt;/b&gt; - Users outside the channel will match (convenience for '&lt;i&gt;!sub,0,0,0&lt;/i&gt;').&lt;br /&gt;Note that an entry applies to either a user or a group, not both.</string>
</property>
<property name="accessibleName">
<string>Group this entry applies to</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
Expand Down Expand Up @@ -727,6 +769,9 @@ Contains the list of members inherited by the current channel. Uncheck &lt;i&gt;
<property name="whatsThis">
<string>This controls which user this entry applies to. Just type in the user name and hit enter to query the server for a match.</string>
</property>
<property name="accessibleName">
<string>User this entry applies to</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
Expand Down
4 changes: 0 additions & 4 deletions src/mumble/ASIOInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ ASIOInput *ASIOInput::aiSelf;
ASIOConfig::ASIOConfig(Settings &st) : ConfigWidget(st) {
setupUi(this);

qcbDevice->setAccessibleName(tr("Device to use for microphone"));
qlwMic->setAccessibleName(tr("List of microphones"));
qlwSpeaker->setAccessibleName(tr("List of speakers"));

// List of devices known to misbehave or be totally useless
QStringList blacklist;
blacklist << QLatin1String("{a91eaba1-cf4c-11d3-b96a-00a0c9c7b61a}"); // ASIO DirectX
Expand Down
13 changes: 11 additions & 2 deletions src/mumble/ASIOInput.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>506</width>
<height>434</height>
<width>508</width>
<height>465</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -44,6 +44,9 @@
<property name="whatsThis">
<string>This chooses what device to query. You still need to actually query the device and select which channels to use.</string>
</property>
<property name="accessibleName">
<string>Device to use for microphone</string>
</property>
</widget>
</item>
<item>
Expand Down Expand Up @@ -181,6 +184,9 @@
<height>16777215</height>
</size>
</property>
<property name="accessibleName">
<string>List of microphones</string>
</property>
</widget>
</item>
</layout>
Expand Down Expand Up @@ -353,6 +359,9 @@
<height>16777215</height>
</size>
</property>
<property name="accessibleName">
<string>List of speakers</string>
</property>
</widget>
</item>
</layout>
Expand Down
26 changes: 0 additions & 26 deletions src/mumble/AudioConfigDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ AudioInputDialog::AudioInputDialog(Settings &st) : ConfigWidget(st) {

setupUi(this);

qcbSystem->setAccessibleName(tr("Audio system"));
qcbDevice->setAccessibleName(tr("Input device"));
qcbEcho->setAccessibleName(tr("Echo cancellation mode"));
qcbTransmit->setAccessibleName(tr("Transmission mode"));
qsDoublePush->setAccessibleName(tr("PTT lock threshold"));
qsPTTHold->setAccessibleName(tr("PTT hold threshold"));
qsTransmitHold->setAccessibleName(tr("Silence below"));
abSpeech->setAccessibleName(tr("Current speech detection chance"));
qsTransmitMin->setAccessibleName(tr("Silence below"));
qsTransmitMax->setAccessibleName(tr("Speech above"));
qsSpeexNoiseSupStrength->setAccessibleName(tr("Noise suppression"));
qsbIdle->setAccessibleName(tr("Initiate idle action after (in minutes)"));
qlInputHelp->setVisible(false);

if (AudioInputRegistrar::qmNew) {
Expand Down Expand Up @@ -642,20 +630,6 @@ void AudioOutputDialog::enablePulseAudioAttenuationOptionsFor(const QString &out
AudioOutputDialog::AudioOutputDialog(Settings &st) : ConfigWidget(st) {
setupUi(this);

qcbSystem->setAccessibleName(tr("Output system"));
qcbDevice->setAccessibleName(tr("Output device"));
qsJitter->setAccessibleName(tr("Default jitter buffer"));
qsVolume->setAccessibleName(tr("Volume of incoming speech"));
qsDelay->setAccessibleName(tr("Output delay"));
qsOtherVolume->setAccessibleName(tr("Attenuation of other applications during speech"));
qsMinDistance->setAccessibleName(tr("Minimum distance"));
qsMaxDistance->setAccessibleName(tr("Maximum distance"));
qsMinimumVolume->setAccessibleName(tr("Minimum volume"));
qsBloom->setAccessibleName(tr("Bloom"));
qsPacketDelay->setAccessibleName(tr("Delay variance"));
qsPacketLoss->setAccessibleName(tr("Packet loss"));
qcbLoopback->setAccessibleName(tr("Loopback"));

if (AudioOutputRegistrar::qmNew) {
QList< QString > keys = AudioOutputRegistrar::qmNew->keys();
foreach (QString key, keys) { qcbSystem->addItem(key); }
Expand Down
Loading

0 comments on commit 5110717

Please sign in to comment.