aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/posts-list.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-06-07 17:36:46 +0200
committerArmand Philippot <git@armandphilippot.com>2022-06-07 17:41:43 +0200
commitb1103a9554c5593c065466d1e289db2680cf2993 (patch)
tree3e786789f8dfdb42d9e524171d2dfa5812c1fff0 /src/components/organisms/layout/posts-list.tsx
parent234b67fe98c6167e4f83f43e11942a9e937c2a60 (diff)
chore: add a label to progress bar
The progress element is a form element, so a label is required to be accessible. Since I'm not using it without label, I transform the optional info parameter to a mandatory label parameter.
Diffstat (limited to 'src/components/organisms/layout/posts-list.tsx')
-rw-r--r--src/components/organisms/layout/posts-list.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/organisms/layout/posts-list.tsx b/src/components/organisms/layout/posts-list.tsx
index 24869fd..e3788c7 100644
--- a/src/components/organisms/layout/posts-list.tsx
+++ b/src/components/organisms/layout/posts-list.tsx
@@ -190,10 +190,12 @@ const PostsList: FC<PostsListProps> = ({
return (
<>
<ProgressBar
+ aria-label={progressInfo}
+ current={posts.length}
+ id="loaded-posts"
+ label={progressInfo}
min={1}
max={total}
- current={posts.length}
- info={progressInfo}
/>
{showLoadMoreBtn && (
<Button