Accessibility Issue: Dynamic type fontsizes are unsupported
Chưa có ai nhận issue này.
- 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
We are trying to fix all accessibility issues on our app, and noticed this warning with textinput with iOS Accessibility Inspector while running on audit
allowFontScaling={true} has no effect on this warning
<View style={{flex: 1, backgroundColor: '#fff'}}> <TextInput style={{padding: 20}} placeholder="Type here..." allowFontScaling={true}></TextInput> </View> </View>
How can we remove this warning?
Steps to reproduce
- Run the below sample application on iOS simulator or a real device
- Select 'Accessibility inspector' from Xcode developer tools
- Run an audit on the screen
- Will get the below error for text input
" Dynamic Text font sizes are unsupported. User will not be able to change the font size of this element"
Is there anything missing here?
React Native Version
0.79.2
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
System:
OS: macOS 15.5
CPU: (11) arm64 Apple M3 Pro
Memory: 113.31 MB / 18.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.15.1
path: ~/.nvm/versions/node/v20.15.1/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 10.7.0
path: ~/.nvm/versions/node/v20.15.1/bin/npm
Watchman:
version: 2025.02.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.4
- iOS 18.4
- macOS 15.4
- tvOS 18.4
- visionOS 2.4
- watchOS 11.4
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2411.12071903
Xcode:
version: 16.3/16E140
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.12
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: 18.0.0
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.2
wanted: 0.79.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
NA
MANDATORY Reproducer
https://github.com/anoopmm/accessibility.git
Screenshots and Videos
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với reproducer bắt buộc và chạy ví dụ TextInput của nó qua quá trình audit bằng iOS Accessibility Inspector được mô tả trong issue. Truy vết cách React Native 0.79.2 xử lý allowFontScaling cho iOS TextInput, sau đó xác minh rằng cảnh báo „Dynamic Text font sizes“ được báo cáo đã được giải quyết mà không làm phát sinh hồi quy trong hành vi của sample.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- 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
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 38/100