Table, Tree table: add dataReloadBtnLoading input so the reload button keeps focus while data loads
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
cps-table and cps-tree-table only offer dataReloadBtnDisabled for the "Reload data" toolbar button. Apps bind it to their loading state, so the button is disabled while the data reloads.
A disabled button can't keep keyboard focus. When a keyboard user presses "Reload data", focus falls back to <body> and the focus ring disappears until the data arrives. With a real backend that takes a second or more. Screen readers lose their place too. (WCAG 2.4.3 Focus Order, 2.4.7 Focus Visible.)
Apps can move focus back once loading ends, but the gap remains. The only way around it today is to stop disabling the button, and then the user gets no sign that a reload is running.
Proposal
Add an input dataReloadBtnLoading: boolean (default false) to CpsTableComponent and CpsTreeTableComponent, and pass it to the reload button:
<cps-button
ariaLabel="Reload data"
icon="refresh"
...
[disabled]="dataReloadBtnDisabled"
[loading]="dataReloadBtnLoading"
(clicked)="onReloadData()">
</cps-button>
cps-button already handles loading the way we need:
- the native button stays enabled, so it keeps focus and its focus ring;
- clicks and Enter are ignored while loading, so no double reloads;
- it gets
aria-busy="true"and the loading style.
dataReloadBtnDisabled stays as it is, for when reloading really isn't possible.
Example
<cps-table
[showDataReloadBtn]="true"
[dataReloadBtnLoading]="loading"
(dataReloadBtnClicked)="reload()"
[loading]="loading">
</cps-table>
- Ngôn ngữ chính
- TypeScript
- Star
- 9
- Fork
- 7
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của AbsaOSS/cps-shared-ui
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
AbsaOSS/cps-shared-ui#875 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement library
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
AbsaOSS/cps-shared-ui#644 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Backport changes missing from v21 (up to v22.2.0)Có thể đã có người làm @fateeand đã nhận 1 ngày trước. Đang mởenhancement library
AbsaOSS/cps-shared-ui#904 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mark disabled datepicker cells as aria-disabled in v21Có thể đã có người làm @fateeand đã nhận 1 ngày trước. Đang mởenhancement library
AbsaOSS/cps-shared-ui#905 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix WCAG 2.5.3 label-in-name mismatches and re-enable axe ruleCó thể đã có người làm @lukasmatta đã nhận 1 ngày trước. Đang mởaccessibility
AbsaOSS/cps-shared-ui#900 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AbsaOSS/cps-shared-ui
Issue tương tự
-
Replace discontinued crypto-js in the themeCó thể đã có người làm @aelmanaa đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
PaloAltoNetworks/docusaurus-openapi-docs#1689 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
solana-foundation/solana-web3.js#4015 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
formatSearchQuery drops the :present modifier, so `email:present=true` is sent as `email=true`Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
ivopogace/opencode-courier#422 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
chapel-lang/chapel-vscode#158 ·
Maintainer thường phản hồi trong vòng 1 ngày