Skip to content

Commit 6e4289b

Browse files
committed
Announce loading states to screen readers in logs tab
1 parent 49fe747 commit 6e4289b

File tree

2 files changed

+11
-3
lines changed
  • services/backend-api/client/src/features/feed/components/UserFeedLogs

2 files changed

+11
-3
lines changed

services/backend-api/client/src/features/feed/components/UserFeedLogs/DeliveryHistory/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const createStatusLabel = ({ status }: { status: UserFeedDeliveryLogStatus }) =>
101101
export const DeliveryHistory = () => {
102102
const [detailsData, setDetailsData] = useState("");
103103
const { articleFormatOptions, userFeed } = useUserFeedContext();
104-
const { data, status, error, skip, nextPage, prevPage, fetchStatus } =
104+
const { data, status, error, skip, nextPage, prevPage, fetchStatus, limit } =
105105
useUserFeedDeliveryLogsWithPagination({
106106
feedId: userFeed.id,
107107
data: {},
@@ -159,6 +159,10 @@ export const DeliveryHistory = () => {
159159
<Divider />
160160
</Box>
161161
</Box>
162+
<Box srOnly aria-live="polite">
163+
{fetchStatus === "fetching" && `Loading rows ${skip} through ${skip + limit}`}
164+
{data && `Finished loading rows ${skip} through ${skip + limit}`}
165+
</Box>
162166
{status === "loading" && (
163167
<Center pb={8}>
164168
<Spinner />

services/backend-api/client/src/features/feed/components/UserFeedLogs/RequestHistory/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { InlineErrorAlert } from "../../../../../components";
3636
import { useUserFeedContext } from "../../../../../contexts/UserFeedContext";
3737

3838
const QuestionOutlineComponent = forwardRef<any>((props, ref) => (
39-
<QuestionOutlineIcon fontSize={12} tabIndex={0} ref={ref} {...props} />
39+
<QuestionOutlineIcon fontSize={12} tabIndex={-1} ref={ref} aria-hidden {...props} />
4040
));
4141

4242
const createStatusLabel = (
@@ -83,7 +83,7 @@ export const RequestHistory = () => {
8383
const {
8484
userFeed: { id: feedId },
8585
} = useUserFeedContext();
86-
const { data, status, error, skip, nextPage, prevPage, fetchStatus } =
86+
const { data, status, error, skip, nextPage, prevPage, fetchStatus, limit } =
8787
useUserFeedRequestsWithPagination({
8888
feedId,
8989
data: {},
@@ -106,6 +106,10 @@ export const RequestHistory = () => {
106106
<Divider />
107107
</Box>
108108
</Box>
109+
<Box srOnly aria-live="polite">
110+
{fetchStatus === "fetching" && `Loading rows ${skip} through ${skip + limit}`}
111+
{data && `Finished loading rows ${skip} through ${skip + limit}`}
112+
</Box>
109113
{status === "loading" && (
110114
<Center pb={8}>
111115
<Spinner />

0 commit comments

Comments
 (0)