callstack / callstack/react-native-paper
Handling accessibility feature boldTextEnabled
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
**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**
-
贡献指南
调研方向
首先跟踪 PaperProvider 如何提供 context,以及 Paper 的 Text 组件如何处理文本样式,然后查看 React Native 的 AccessibilityInfo.isBoldTextEnabled() 行为。所要求的结果是提供一种 provider 级别的方式,在启用辅助功能设置时自动应用粗体文本,而无需将每个 Text 组件都包装在自定义 hook 中。没有指定具体的文件或测试,因此请先确定相关的 provider、Text 入口点和现有的辅助功能测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native, typescript
- 领域
- accessibility, frontend, mobile
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100