callstack / callstack/react-native-paper
Handling accessibility feature boldTextEnabled
- Ngôn ngữ chính
- TypeScript
- Star
- 14.5k
- Fork
- 2.2k
- Merge trung bình
- 5 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 12
Mô tả
**Is your feature request related to a problem? Please describe.**
Problem is there is no general way to set text bold from one place. I would have to check `AccessibilityInfo.isBoldTextEnabled()` in a hook. And then call that hook everywhere I use `` -component.
**Describe the solution you'd like**
A simple way to provide this info directly or automatically in `` and it would handle the rest. Make the text bold if it needs to based on the accessibility-feature's state.
**Describe alternatives you've considered**
Making a hook and custom text-component that I wrap Paper Text-component inside. But that is not gonna scale very well.
**Additional context**
-
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi cách PaperProvider cung cấp context và cách component Text của Paper xử lý các style của văn bản, sau đó xem xét hành vi của AccessibilityInfo.isBoldTextEnabled() trong React Native. Kết quả được yêu cầu là một cách ở cấp provider để tự động áp dụng văn bản in đậm khi cài đặt trợ năng được bật, mà không cần bọc mọi component Text trong một custom hook. Không có file hoặc test cụ thể nào được nêu, vì vậy trước tiên hãy xác định provider liên quan, entry point của Text và các test trợ năng hiện có.
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, typescript
- Lĩnh vực
- accessibility, frontend, mobile
- Loại issue
- Tính năng
- Độ 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
- 35/100