From: Jay Sitter Date: Sat, 17 Jun 2023 17:51:21 +0000 (-0400) Subject: fix(a11y): Fix some a11y issues in Site Sidebar and use native Bootstrap Collapse... X-Git-Url: http://these/git/%22https:/nerdica.net/static/%22%7B%7D/sneer-club-logo.svg?a=commitdiff_plain;h=ff4d37d03aa683801711199f774cfd633f858f5d;p=lemmy-ui.git fix(a11y): Fix some a11y issues in Site Sidebar and use native Bootstrap Collapse and Card classes --- 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}
-
+
); }