From b1103a9554c5593c065466d1e289db2680cf2993 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 7 Jun 2022 17:36:46 +0200
Subject: 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.
---
 src/components/organisms/layout/posts-list.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/components/organisms/layout/posts-list.tsx')

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
-- 
cgit v1.2.3

