Skip to content

Commit e764bb7

Browse files
committed
Fixed the role of toggles
Fixed the Systems Settings label and its translations
1 parent f0ece14 commit e764bb7

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

Assets/Localization/String Tables/Game Text_en.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ MonoBehaviour:
168168
m_Items:
169169
- rid: 2216566543976235777
170170
- m_Id: 1468861612453888
171-
m_Localized: OS Settings (read-only)
171+
m_Localized: System Settings (read-only)
172172
m_Metadata:
173173
m_Items: []
174174
- m_Id: 1469259735789568

Assets/Localization/String Tables/Game Text_es.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ MonoBehaviour:
166166
m_Items:
167167
- rid: 2216566543976235779
168168
- m_Id: 1468861612453888
169-
m_Localized: "Configuraci\xF3n del SO (solo lectura)"
169+
m_Localized: "Configuraci\xF3n del sistema (solo lectura)"
170170
m_Metadata:
171171
m_Items: []
172172
- m_Id: 1469259735789568

Assets/Localization/String Tables/Game Text_ja.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ MonoBehaviour:
166166
m_Items:
167167
- rid: 2216566543976235778
168168
- m_Id: 1468861612453888
169-
m_Localized: "OS\u8A2D\u5B9A\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09"
169+
m_Localized: "\u30B7\u30B9\u30C6\u30E0\u8A2D\u5B9A\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09"
170170
m_Metadata:
171171
m_Items: []
172172
- m_Id: 1469259735789568

Assets/Scripts/Screen Reader/UITk/Handlers/BaseFieldHandler.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using UnityEngine.Accessibility;
12
using UnityEngine.Scripting;
23
using UnityEngine.UIElements;
34

@@ -46,4 +47,22 @@ void EnsureLabelIsNotAccessible()
4647
}
4748
}
4849
}
50+
51+
[Preserve]
52+
class ToggleHandler : BaseFieldHandler<bool>
53+
{
54+
public override AccessibilityRole GetRole()
55+
{
56+
return AccessibilityRole.Toggle;
57+
}
58+
}
59+
60+
[Preserve]
61+
class RadioButtonHandler : BaseFieldHandler<bool>
62+
{
63+
public override AccessibilityRole GetRole()
64+
{
65+
return AccessibilityRole.Toggle;
66+
}
67+
}
4968
}

Assets/Scripts/Screen Reader/UITk/Handlers/VisualElementAccessibilityHandlerFactory.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ public static void RegisterBuiltinAccessibleElementFactories()
188188
RegisterGenericFactory(typeof(BaseSlider<>), typeof(BaseSliderHandler<>));
189189
RegisterGenericFactory(typeof(BasePopupField<,>), typeof(BasePopupFieldHandler<,>));
190190
RegisterFactory<TextField, TextFieldFieldHandler>();
191+
RegisterFactory<UnityEngine.UIElements.Toggle, ToggleHandler>();
192+
RegisterFactory<UnityEngine.UIElements.RadioButton, RadioButtonHandler>();
193+
191194
//RegisterFactory<DropdownField, DropdownFieldHandler>();
192195
RegisterFactory<ListView, ListViewHandler>();
193196
RegisterFactory<ScrollView, ScrollViewHandler>();

0 commit comments

Comments
 (0)