Chip: on the web every Chip sets aria-selected on role button
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 84/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- react-native, typescript
研究方向
從Chip.tsx開始,issue指出這裡會傳入aria-selected,且selected預設為false;修改之前,先比較Web和原生端的行為。檢查/chip中的Chip範例,並在Web應用程式上執行axe-core,以確認違規問題已消失,且選取的toggle會公開其狀態。當一般操作型chip省略toggle狀態,且選取的Web chip使用支援的按鈕狀態時,即為完成。
由索引模型根據 Issue 內容生成。
描述
Current behaviour
On the web, every Chip renders <button role="button" aria-selected="true|false"> (Chip.tsx passes aria-selected={selected}, and selected defaults to false). aria-selected is not allowed on role button, so screen readers ignore the selected state, and axe-core reports aria-allowed-attr (critical): "ARIA attribute is not allowed: aria-selected". The example app shows it on the Chip, Card, Floating Action Button, List.Section and Tooltip screens.
Expected behaviour
On the web a Chip used as a toggle exposes its state with aria-pressed, the state role button supports, and only when the app passes selected, so a plain action chip isn't announced as a toggle. Native keeps announcing the selected state as it does today. axe reports no aria-allowed-attr violation.
How to reproduce?
- Run the example app on the web from
main(yarn install, thennpx expo start --webinexample/). - Open the Chip example (
/chip). - Run axe-core on the page (for example with the axe DevTools extension).
Preview
What have you tried so far?
Your Environment
| software | version |
|---|---|
| react-native-paper | main (8cb344b) |
| browser | Chromium 153 |
- 主要語言
- TypeScript
- 星號
- 14.5k
- 分支
- 2.3k
- 平均合併
- 2 天 12 小時
- 30 天內合併 PR
- 22
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
callstack/react-native-paper 的其他 Issue
-
feature request
難度 2/5 1-3 小時 新手友好度 72/100
callstack/react-native-paper#5189 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
callstack/react-native-paper#5187 ·
維護者通常 1 天內回覆
-
Accessibility example app good first task
難度 1/5 1-3 小時 新手友好度 86/100
callstack/react-native-paper#5182 ·
維護者通常 1 天內回覆
-
Chip: accessibilityState passed by caller is discarded; aria-checked is never forwarded to the real rendered node可能已有人在做 @bhumikabiyani 於 2 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
callstack/react-native-paper#5146 · 2 則留言 ·
維護者通常 1 天內回覆
-
Tooltip: onPress event object is not propagated to parent component on native可能已有人在做 @aliyilmaztech 於 87 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 74/100
callstack/react-native-paper#5003 ·
維護者通常 1 天內回覆
查看 callstack/react-native-paper 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆
-
pending close triaging
難度 2/5 1-3 小時 新手友好度 78/100
anomalyco/opencode#62582 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
live-codes/livecodes#1079 · 1 則留言 ·
維護者通常 1 天內回覆
-
Add: ESP 2 RO未關閉approved check:passed streams:add
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆