From 072d253baa978b66708abe6bc31a8267b37e4595 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Sat, 17 Jun 2023 15:09:10 -0400 Subject: [PATCH] fix(a11y): Apply same accordion/collapse markup to Subscribed Communities sidebar card --- src/shared/components/home/home.tsx | 80 +++++++++++++-------- src/shared/components/home/site-sidebar.tsx | 9 ++- 2 files changed, 57 insertions(+), 32 deletions(-) diff --git a/src/shared/components/home/home.tsx b/src/shared/components/home/home.tsx index 4d79bc6..851c5c2 100644 --- a/src/shared/components/home/home.tsx +++ b/src/shared/components/home/home.tsx @@ -492,12 +492,14 @@ export class Home extends Component { showLocal={showLocal(this.isoData)} /> {this.hasFollows && ( -
-
{this.subscribedCommunities}
-
+
+
+ {this.subscribedCommunities} +
+
)} ); @@ -543,39 +545,59 @@ export class Home extends Component { const { subscribedCollapsed } = this.state; return ( -
-
- - # - + <> +
+
+ # - - + + # + + +
-
- {!subscribedCollapsed && ( -
    - {UserService.Instance.myUserInfo?.follows.map(cfv => ( -
  • - -
  • - ))} -
- )} -
+ +
+
+
    + {UserService.Instance.myUserInfo?.follows.map(cfv => ( +
  • + +
  • + ))} +
+
+
+ ); } diff --git a/src/shared/components/home/site-sidebar.tsx b/src/shared/components/home/site-sidebar.tsx index b09f27d..3df4eb6 100644 --- a/src/shared/components/home/site-sidebar.tsx +++ b/src/shared/components/home/site-sidebar.tsx @@ -34,7 +34,10 @@ export class SiteSidebar extends Component { id="sidebarInfo" className="card border-secondary mb-3 overflow-hidden" > -
+
{this.siteName()} {!this.state.collapsed && ( @@ -55,7 +58,7 @@ export class SiteSidebar extends Component { siteName() { return ( -
+ <>
{this.props.site.name}
-
+ ); } -- 2.44.1