Skip to content

Commit 149778f

Browse files
YajurGYajur-Grover
andauthored
[Fabric] Add accessibilityHint support to UIA tree (#12036)
* added accessibilityHint support * Change files * updated repo * fixed formatting --------- Co-authored-by: Yajur Grover <[email protected]>
1 parent 2ed6c53 commit 149778f

File tree

5 files changed

+238
-41
lines changed

5 files changed

+238
-41
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "added accessibilityHint support",
4+
"packageName": "react-native-windows",
5+
"email": "email not defined",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
{
2+
"version": 1,
3+
"dependencies": {
4+
"native,Version=v0.0": {
5+
"boost": {
6+
"type": "Direct",
7+
"requested": "[1.76.0, )",
8+
"resolved": "1.76.0",
9+
"contentHash": "p+w3YvNdXL8Cu9Fzrmexssu0tZbWxuf6ywsQqHjDlKFE5ojXHof1HIyMC3zDLfLnh80dIeFcEUAuR2Asg/XHRA=="
10+
},
11+
"Microsoft.JavaScript.Hermes": {
12+
"type": "Direct",
13+
"requested": "[0.1.15, )",
14+
"resolved": "0.1.15",
15+
"contentHash": "My/u5RvxoymtwWokoweU6iVpuP79w271UjadcmSNqnQ9ESIv00tlVP4sHnIiN3t2lJNDeciyE1EVF4swGPECKQ=="
16+
},
17+
"Microsoft.Toolkit.Win32.UI.XamlApplication": {
18+
"type": "Direct",
19+
"requested": "[6.1.3, )",
20+
"resolved": "6.1.3",
21+
"contentHash": "0YtzPNOzfxe+S+fOHw+CsD/RaHIl3FNIBFPh9uzNaORGguopUws/cU7uXoG6ykaJ221k3Vr0nq50iyb+kR/ERg=="
22+
},
23+
"Microsoft.UI.Xaml": {
24+
"type": "Direct",
25+
"requested": "[2.7.0-prerelease.210913003, )",
26+
"resolved": "2.7.0-prerelease.210913003",
27+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
28+
},
29+
"Microsoft.VCRTForwarders.140": {
30+
"type": "Direct",
31+
"requested": "[1.0.2-rc, )",
32+
"resolved": "1.0.2-rc",
33+
"contentHash": "/r+sjtEeCIGyDhobIZ5hSmYhC/dSyGZxf1SxYJpElUhB0LMCktOMFs9gXrauXypIFECpVynNyVjAmJt6hjJ5oQ=="
34+
},
35+
"Microsoft.Windows.CppWinRT": {
36+
"type": "Direct",
37+
"requested": "[2.0.211028.7, )",
38+
"resolved": "2.0.211028.7",
39+
"contentHash": "JBGI0c3WLoU6aYJRy9Qo0MLDQfObEp+d4nrhR95iyzf7+HOgjRunHDp/6eGFREd7xq3OI1mll9ecJrMfzBvlyg=="
40+
},
41+
"Microsoft.Build.Tasks.Git": {
42+
"type": "Transitive",
43+
"resolved": "1.1.1",
44+
"contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q=="
45+
},
46+
"Microsoft.SourceLink.Common": {
47+
"type": "Transitive",
48+
"resolved": "1.1.1",
49+
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
50+
},
51+
"Microsoft.SourceLink.GitHub": {
52+
"type": "Transitive",
53+
"resolved": "1.1.1",
54+
"contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
55+
"dependencies": {
56+
"Microsoft.Build.Tasks.Git": "1.1.1",
57+
"Microsoft.SourceLink.Common": "1.1.1"
58+
}
59+
},
60+
"common": {
61+
"type": "Project"
62+
},
63+
"fmt": {
64+
"type": "Project"
65+
},
66+
"folly": {
67+
"type": "Project",
68+
"dependencies": {
69+
"Fmt": "[1.0.0, )",
70+
"boost": "[1.76.0, )"
71+
}
72+
},
73+
"microsoft.reactnative": {
74+
"type": "Project",
75+
"dependencies": {
76+
"Common": "[1.0.0, )",
77+
"Folly": "[1.0.0, )",
78+
"Microsoft.JavaScript.Hermes": "[0.1.15, )",
79+
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
80+
"Microsoft.UI.Xaml": "[2.7.0-prerelease.210913003, )",
81+
"ReactCommon": "[1.0.0, )",
82+
"boost": "[1.76.0, )"
83+
}
84+
},
85+
"reactcommon": {
86+
"type": "Project",
87+
"dependencies": {
88+
"Folly": "[1.0.0, )",
89+
"boost": "[1.76.0, )"
90+
}
91+
},
92+
"reactnativepicker": {
93+
"type": "Project",
94+
"dependencies": {
95+
"Microsoft.ReactNative": "[1.0.0, )",
96+
"Microsoft.UI.Xaml": "[2.7.0-prerelease.210913003, )"
97+
}
98+
}
99+
},
100+
"native,Version=v0.0/win": {
101+
"Microsoft.Toolkit.Win32.UI.XamlApplication": {
102+
"type": "Direct",
103+
"requested": "[6.1.3, )",
104+
"resolved": "6.1.3",
105+
"contentHash": "0YtzPNOzfxe+S+fOHw+CsD/RaHIl3FNIBFPh9uzNaORGguopUws/cU7uXoG6ykaJ221k3Vr0nq50iyb+kR/ERg=="
106+
},
107+
"Microsoft.UI.Xaml": {
108+
"type": "Direct",
109+
"requested": "[2.7.0-prerelease.210913003, )",
110+
"resolved": "2.7.0-prerelease.210913003",
111+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
112+
},
113+
"Microsoft.VCRTForwarders.140": {
114+
"type": "Direct",
115+
"requested": "[1.0.2-rc, )",
116+
"resolved": "1.0.2-rc",
117+
"contentHash": "/r+sjtEeCIGyDhobIZ5hSmYhC/dSyGZxf1SxYJpElUhB0LMCktOMFs9gXrauXypIFECpVynNyVjAmJt6hjJ5oQ=="
118+
}
119+
},
120+
"native,Version=v0.0/win-arm64": {
121+
"Microsoft.Toolkit.Win32.UI.XamlApplication": {
122+
"type": "Direct",
123+
"requested": "[6.1.3, )",
124+
"resolved": "6.1.3",
125+
"contentHash": "0YtzPNOzfxe+S+fOHw+CsD/RaHIl3FNIBFPh9uzNaORGguopUws/cU7uXoG6ykaJ221k3Vr0nq50iyb+kR/ERg=="
126+
},
127+
"Microsoft.UI.Xaml": {
128+
"type": "Direct",
129+
"requested": "[2.7.0-prerelease.210913003, )",
130+
"resolved": "2.7.0-prerelease.210913003",
131+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
132+
},
133+
"Microsoft.VCRTForwarders.140": {
134+
"type": "Direct",
135+
"requested": "[1.0.2-rc, )",
136+
"resolved": "1.0.2-rc",
137+
"contentHash": "/r+sjtEeCIGyDhobIZ5hSmYhC/dSyGZxf1SxYJpElUhB0LMCktOMFs9gXrauXypIFECpVynNyVjAmJt6hjJ5oQ=="
138+
}
139+
},
140+
"native,Version=v0.0/win-x64": {
141+
"Microsoft.Toolkit.Win32.UI.XamlApplication": {
142+
"type": "Direct",
143+
"requested": "[6.1.3, )",
144+
"resolved": "6.1.3",
145+
"contentHash": "0YtzPNOzfxe+S+fOHw+CsD/RaHIl3FNIBFPh9uzNaORGguopUws/cU7uXoG6ykaJ221k3Vr0nq50iyb+kR/ERg=="
146+
},
147+
"Microsoft.UI.Xaml": {
148+
"type": "Direct",
149+
"requested": "[2.7.0-prerelease.210913003, )",
150+
"resolved": "2.7.0-prerelease.210913003",
151+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
152+
},
153+
"Microsoft.VCRTForwarders.140": {
154+
"type": "Direct",
155+
"requested": "[1.0.2-rc, )",
156+
"resolved": "1.0.2-rc",
157+
"contentHash": "/r+sjtEeCIGyDhobIZ5hSmYhC/dSyGZxf1SxYJpElUhB0LMCktOMFs9gXrauXypIFECpVynNyVjAmJt6hjJ5oQ=="
158+
}
159+
},
160+
"native,Version=v0.0/win-x86": {
161+
"Microsoft.Toolkit.Win32.UI.XamlApplication": {
162+
"type": "Direct",
163+
"requested": "[6.1.3, )",
164+
"resolved": "6.1.3",
165+
"contentHash": "0YtzPNOzfxe+S+fOHw+CsD/RaHIl3FNIBFPh9uzNaORGguopUws/cU7uXoG6ykaJ221k3Vr0nq50iyb+kR/ERg=="
166+
},
167+
"Microsoft.UI.Xaml": {
168+
"type": "Direct",
169+
"requested": "[2.7.0-prerelease.210913003, )",
170+
"resolved": "2.7.0-prerelease.210913003",
171+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
172+
},
173+
"Microsoft.VCRTForwarders.140": {
174+
"type": "Direct",
175+
"requested": "[1.0.2-rc, )",
176+
"resolved": "1.0.2-rc",
177+
"contentHash": "/r+sjtEeCIGyDhobIZ5hSmYhC/dSyGZxf1SxYJpElUhB0LMCktOMFs9gXrauXypIFECpVynNyVjAmJt6hjJ5oQ=="
178+
}
179+
}
180+
}
181+
}

vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPropertyValue(PROPERT
281281
pRetVal->boolVal = (props->accessible && props->accessibilityRole != "none") ? VARIANT_TRUE : VARIANT_FALSE;
282282
break;
283283
}
284+
case UIA_HelpTextPropertyId: {
285+
pRetVal->vt = VT_BSTR;
286+
auto helpText = ::Microsoft::Common::Unicode::Utf8ToUtf16(props->accessibilityHint);
287+
pRetVal->bstrVal = SysAllocString(helpText.c_str());
288+
hr = pRetVal->bstrVal != nullptr ? S_OK : E_OUTOFMEMORY;
289+
break;
290+
}
284291
}
285292

286293
return hr;

vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,9 @@ void CompositionBaseComponentView::updateAccessibilityProps(
10941094

10951095
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
10961096
provider, UIA_ControlTypePropertyId, oldViewProps.accessibilityRole, newViewProps.accessibilityRole);
1097+
1098+
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
1099+
provider, UIA_HelpTextPropertyId, oldViewProps.accessibilityHint, newViewProps.accessibilityHint);
10971100
}
10981101

10991102
void CompositionBaseComponentView::updateBorderLayoutMetrics(

vnext/Microsoft.ReactNative/packages.lock.json

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@
2626
},
2727
"Microsoft.UI.Xaml": {
2828
"type": "Direct",
29-
"requested": "[2.8.0, )",
30-
"resolved": "2.8.0",
31-
"contentHash": "vxdHxTr63s5KVtNddMFpgvjBjUH50z7seq/5jLWmmSuf8poxg+sXrywkofUdE8ZstbpO9y3FL/IXXUcPYbeesA==",
32-
"dependencies": {
33-
"Microsoft.Web.WebView2": "1.0.1264.42"
34-
}
29+
"requested": "[2.7.0-prerelease.210913003, )",
30+
"resolved": "2.7.0-prerelease.210913003",
31+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
3532
},
3633
"Microsoft.Windows.CppWinRT": {
3734
"type": "Direct",
@@ -49,11 +46,6 @@
4946
"resolved": "1.1.1",
5047
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
5148
},
52-
"Microsoft.Web.WebView2": {
53-
"type": "Transitive",
54-
"resolved": "1.0.1264.42",
55-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
56-
},
5749
"common": {
5850
"type": "Project"
5951
},
@@ -63,8 +55,8 @@
6355
"folly": {
6456
"type": "Project",
6557
"dependencies": {
66-
"boost": "[1.76.0, )",
67-
"fmt": "[1.0.0, )"
58+
"Fmt": "[1.0.0, )",
59+
"boost": "[1.76.0, )"
6860
}
6961
},
7062
"reactcommon": {
@@ -76,52 +68,59 @@
7668
}
7769
},
7870
"native,Version=v0.0/win10-arm": {
79-
"Microsoft.Web.WebView2": {
80-
"type": "Transitive",
81-
"resolved": "1.0.1264.42",
82-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
71+
"Microsoft.UI.Xaml": {
72+
"type": "Direct",
73+
"requested": "[2.7.0-prerelease.210913003, )",
74+
"resolved": "2.7.0-prerelease.210913003",
75+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
8376
}
8477
},
8578
"native,Version=v0.0/win10-arm-aot": {
86-
"Microsoft.Web.WebView2": {
87-
"type": "Transitive",
88-
"resolved": "1.0.1264.42",
89-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
79+
"Microsoft.UI.Xaml": {
80+
"type": "Direct",
81+
"requested": "[2.7.0-prerelease.210913003, )",
82+
"resolved": "2.7.0-prerelease.210913003",
83+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
9084
}
9185
},
9286
"native,Version=v0.0/win10-arm64-aot": {
93-
"Microsoft.Web.WebView2": {
94-
"type": "Transitive",
95-
"resolved": "1.0.1264.42",
96-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
87+
"Microsoft.UI.Xaml": {
88+
"type": "Direct",
89+
"requested": "[2.7.0-prerelease.210913003, )",
90+
"resolved": "2.7.0-prerelease.210913003",
91+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
9792
}
9893
},
9994
"native,Version=v0.0/win10-x64": {
100-
"Microsoft.Web.WebView2": {
101-
"type": "Transitive",
102-
"resolved": "1.0.1264.42",
103-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
95+
"Microsoft.UI.Xaml": {
96+
"type": "Direct",
97+
"requested": "[2.7.0-prerelease.210913003, )",
98+
"resolved": "2.7.0-prerelease.210913003",
99+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
104100
}
105101
},
106102
"native,Version=v0.0/win10-x64-aot": {
107-
"Microsoft.Web.WebView2": {
108-
"type": "Transitive",
109-
"resolved": "1.0.1264.42",
110-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
103+
"Microsoft.UI.Xaml": {
104+
"type": "Direct",
105+
"requested": "[2.7.0-prerelease.210913003, )",
106+
"resolved": "2.7.0-prerelease.210913003",
107+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
111108
}
112109
},
113110
"native,Version=v0.0/win10-x86": {
114-
"Microsoft.Web.WebView2": {
115-
"type": "Transitive",
116-
"resolved": "1.0.1264.42",
117-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
111+
"Microsoft.UI.Xaml": {
112+
"type": "Direct",
113+
"requested": "[2.7.0-prerelease.210913003, )",
114+
"resolved": "2.7.0-prerelease.210913003",
115+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
118116
}
119117
},
120118
"native,Version=v0.0/win10-x86-aot": {
121-
"Microsoft.Web.WebView2": {
122-
"type": "Transitive",
123-
"resolved": "1.0.1264.42",
124-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
119+
"Microsoft.UI.Xaml": {
120+
"type": "Direct",
121+
"requested": "[2.7.0-prerelease.210913003, )",
122+
"resolved": "2.7.0-prerelease.210913003",
123+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
125124
}
126125
}
127126
}

0 commit comments

Comments
 (0)