From ff4d37d03aa683801711199f774cfd633f858f5d Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Sat, 17 Jun 2023 13:51:21 -0400 Subject: [PATCH] fix(a11y): Fix some a11y issues in Site Sidebar and use native Bootstrap Collapse and Card classes --- .../components/common/banner-icon-header.tsx | 4 +- src/shared/components/home/site-sidebar.tsx | 49 ++++++++++++------- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/shared/components/common/banner-icon-header.tsx b/src/shared/components/common/banner-icon-header.tsx index 1df23be..d2fae2e 100644 --- a/src/shared/components/common/banner-icon-header.tsx +++ b/src/shared/components/common/banner-icon-header.tsx @@ -14,7 +14,7 @@ export class BannerIconHeader extends Component { render() { const banner = this.props.banner; const icon = this.props.icon; - return ( + return banner || icon ? (
{banner && } {icon && ( @@ -26,6 +26,6 @@ export class BannerIconHeader extends Component { /> )}
- ); + ) : null; } } diff --git a/src/shared/components/home/site-sidebar.tsx b/src/shared/components/home/site-sidebar.tsx index 66a48ca..283ddf8 100644 --- a/src/shared/components/home/site-sidebar.tsx +++ b/src/shared/components/home/site-sidebar.tsx @@ -29,17 +29,23 @@ export class SiteSidebar extends Component { render() { return ( -
-
-
-
{this.siteName()}
- {!this.state.collapsed && ( - <> - - {this.siteInfo()} - - )} -
+
+
+ {this.siteName()} + {!this.state.collapsed && ( + + )} +
+ +
+
{this.siteInfo()}
); @@ -47,13 +53,22 @@ export class SiteSidebar extends Component { siteName() { return ( -
- {this.props.site.name} +
+
{this.props.site.name}
-
+
); } -- 2.44.1