Commit 4851fb2
Add support for UIAccessibilityPriority (#54289)
Summary:
Adds support for UIAccessibilityPriority on iOS. This is important because we want to be able to set high-priority announcements that cannot be interrupted.
Use case: a modal opens, user performs an action that closes the modal and returns to the previous page. We need to announce it but the voiceover engine will target an element as we've just navigated and cancel the announcement because the default announcement priority is interruptible.
https://developer.apple.com/videos/play/wwdc2023/10036/?time=293 Here's a talk about this in wwdc 2023.
<img width="1813" height="981" alt="Screenshot 2025-10-27 at 11 12 18" src="https://github.com/user-attachments/assets/8306d6f6-a5a9-4834-a5d9-c5b2e014c258" />
## Changelog:
[IOS][ADDED] - Add support for UIAccessibilityPriority in announcements
Pull Request resolved: #54289
Test Plan:
Open the rn-tester app, go to Accessibility -> Check if the screen reader announces.
Press: Announce for accessibility High Priority. You will hear "High Priority Announcement Test, Normal Priority Announcement". The second announcement did not cancel the first announcement (expected behavior)
Press: Announce for accessibility Low Priority: You will only hear "Normal Priority Announcement". The low priority announcement was successfully interrupted.
Reviewed By: cipolleschi
Differential Revision: D87477523
Pulled By: javache
fbshipit-source-id: 5e8ccf26188cce1407cb814df6993fcbf1ade7ce1 parent 7a66582 commit 4851fb2
File tree
6 files changed
+82
-5
lines changed- packages
- react-native
- Libraries/Components/AccessibilityInfo
- React/CoreModules
- src/private/specs_DEPRECATED/modules
- rn-tester/js/examples/Accessibility
6 files changed
+82
-5
lines changedLines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
156 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
479 | 484 | | |
480 | 485 | | |
481 | 486 | | |
482 | | - | |
| 487 | + | |
483 | 488 | | |
484 | 489 | | |
485 | 490 | | |
| |||
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
333 | 350 | | |
334 | 351 | | |
335 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1296 | 1334 | | |
1297 | 1335 | | |
1298 | 1336 | | |
| |||
1308 | 1346 | | |
1309 | 1347 | | |
1310 | 1348 | | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
1311 | 1357 | | |
1312 | 1358 | | |
1313 | 1359 | | |
| |||
0 commit comments