react / react/react-native

NativeAccessibilityManager.setAccessibilityContentSizeMultipliers(…) not actually changing defaults

Đang mở
#53,185 4 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Issue: Author Provided Repro Needs: React Native Team Attention Type: New Architecture
Ngôn ngữ chính
C++
Star
127k
Fork
25.3k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
4

Mô tả

Description

On new architecture, NativeAccessibilityManager.setAccessibilityContentSizeMultipliers(…) seems to not actually update the rendered text scales on iOS over the default values hardcoded in https://github.com/facebook/react-native/blob/main/packages/react-native/React/Base/RCTUtils.mm#L366-L377. On old architecture, these reflect immediately.

Reproducible with Expo 53 in 0.79.5, 0.80.1 (npx expo install expo@canary --fix), and 0.80.2 (yarn add react-native@0.80.2).

  • Calling it on JavaScript initialization (outside/before render) doesn't work either.
  • Interestingly, JS and event handlers report the updated values but the actual rendering does not change. I believe that is why this rn-tester AccessibilityManagerTest still passes.
  • As would be expected, patching the values in RCTUtils.mm before building react-native does reflect so these are the ones being used by Fabric.

Aside: I'm not sure what the plan is forNativeAccessibilityManager given the move away from exposing private APIs but the community probably does need a way to update these values.

Steps to reproduce
  1. Open https://snack.expo.dev/@shollington-popeyes/fc57d4 (just App.js modified).
  2. Make sure you are in non-large Font Scaling mode (iOS settings or button at the bottom of Snack).
  3. Click the "Change Accessibility Multipliers" button and observe no actual change in font scaling.
React Native Version

0.80.2

Affected Platforms

Runtime - iOS

Areas

Fabric - The New Renderer

Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
  OS: macOS 15.5
  CPU: (10) arm64 Apple M4
  Memory: 143.27 MB / 24.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.17.0
    path: ~/.nvm/versions/node/v22.17.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v22.17.0/bin/yarn
  npm:
    version: 10.9.2
    path: ~/.nvm/versions/node/v22.17.0/bin/npm
  Watchman:
    version: 2025.06.30.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.25410.109.2511.13665796
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.15
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 19.1.0
    wanted: 19.1.0
  react-native:
    installed: 0.80.2
    wanted: 0.80.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
Stacktrace or Logs
There is no crash. It is visual/rendering/layout issue.
MANDATORY Reproducer

https://snack.expo.dev/@shollington-popeyes/fc57d4

Screenshots and Videos
Old Architecture New Architecture
Image Image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với các giá trị mặc định được hardcode trong packages/react-native/React/Base/RCTUtils.mm và truy vết cách NativeAccessibilityManager tiếp cận Fabric trên iOS. So sánh luồng đó với rn-tester/IntegrationTests/AccessibilityManagerTest.js và tái hiện bằng Snack được liên kết. Công việc được xem là hoàn tất khi các thay đổi đối với hệ số nhân lúc runtime ảnh hưởng đến văn bản được render trong kiến trúc mới và có coverage cho hồi quy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp, ios, objective-c, react-native
Lĩnh vực
accessibility, mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.