From 9c4a72dff0240564cac1502b9717a25849ba3fea Mon Sep 17 00:00:00 2001 From: Raghunandan Date: Fri, 27 Jan 2023 10:28:43 +0100 Subject: [PATCH 1/3] Add aria label for mobile sidebar links Signed-off-by: Raghunandan --- packages/core-components/src/layout/Sidebar/SidebarGroup.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core-components/src/layout/Sidebar/SidebarGroup.tsx b/packages/core-components/src/layout/Sidebar/SidebarGroup.tsx index 15d22599b5..70fec8a294 100644 --- a/packages/core-components/src/layout/Sidebar/SidebarGroup.tsx +++ b/packages/core-components/src/layout/Sidebar/SidebarGroup.tsx @@ -23,7 +23,7 @@ import { makeStyles } from '@material-ui/core/styles'; import React, { useContext } from 'react'; import { useLocation } from 'react-router-dom'; import { Link } from '../../components'; -import { SidebarConfigContext, SidebarConfig } from './config'; +import { SidebarConfig, SidebarConfigContext } from './config'; import { MobileSidebarContext } from './MobileSidebar'; import { useSidebarPinState } from './SidebarPinStateContext'; @@ -109,6 +109,7 @@ const MobileSidebarGroup = (props: SidebarGroupProps) => { value={value} selected={selected} classes={classes} + aria-label={label} /> ); }; From 43b397609ae24b4bba528a930b65017f59a55981 Mon Sep 17 00:00:00 2001 From: Raghunandan Date: Fri, 27 Jan 2023 10:29:57 +0100 Subject: [PATCH 2/3] Add aria label for support button in mobile, close button in support popover Signed-off-by: Raghunandan --- .../src/components/SupportButton/SupportButton.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/core-components/src/components/SupportButton/SupportButton.tsx b/packages/core-components/src/components/SupportButton/SupportButton.tsx index 7bb9aab9b5..35cf228f52 100644 --- a/packages/core-components/src/components/SupportButton/SupportButton.tsx +++ b/packages/core-components/src/components/SupportButton/SupportButton.tsx @@ -16,8 +16,6 @@ import { useApp } from '@backstage/core-plugin-api'; import { BackstageTheme } from '@backstage/theme'; -import { makeStyles } from '@material-ui/core/styles'; -import useMediaQuery from '@material-ui/core/useMediaQuery'; import Box from '@material-ui/core/Box'; import Button from '@material-ui/core/Button'; import DialogActions from '@material-ui/core/DialogActions'; @@ -27,7 +25,9 @@ import ListItem from '@material-ui/core/ListItem'; import ListItemIcon from '@material-ui/core/ListItemIcon'; import ListItemText from '@material-ui/core/ListItemText'; import Popover from '@material-ui/core/Popover'; +import { makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; +import useMediaQuery from '@material-ui/core/useMediaQuery'; import React, { MouseEventHandler, useState } from 'react'; import { SupportItem, SupportItemLink, useSupportConfig } from '../../hooks'; import { HelpIcon } from '../../icons'; @@ -111,13 +111,14 @@ export function SupportButton(props: SupportButtonProps) { size="small" onClick={onClickHandler} data-testid="support-button" + aria-label="Support" > ) : ( From 68ce7d04172936c0435f76fa422ce72f664e326e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 8 Feb 2023 16:47:35 +0100 Subject: [PATCH 3/3] changeset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/dull-pianos-shave.md | 5 +++++ packages/core-components/src/layout/Sidebar/SidebarGroup.tsx | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changeset/dull-pianos-shave.md diff --git a/.changeset/dull-pianos-shave.md b/.changeset/dull-pianos-shave.md new file mode 100644 index 0000000000..8fae999bda --- /dev/null +++ b/.changeset/dull-pianos-shave.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Added aria labels on the support button and sidebar diff --git a/packages/core-components/src/layout/Sidebar/SidebarGroup.tsx b/packages/core-components/src/layout/Sidebar/SidebarGroup.tsx index 70fec8a294..1eb1423c61 100644 --- a/packages/core-components/src/layout/Sidebar/SidebarGroup.tsx +++ b/packages/core-components/src/layout/Sidebar/SidebarGroup.tsx @@ -109,7 +109,6 @@ const MobileSidebarGroup = (props: SidebarGroupProps) => { value={value} selected={selected} classes={classes} - aria-label={label} /> ); };