Skip to content

Commit 793915b

Browse files
committed
sandbox navigation focus accesible
1 parent bfe09bd commit 793915b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

packages/app/src/app/pages/Sandbox/Editor/Navigation/Navigation.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ const IconComponent: FunctionComponent<IconProps> = ({
6767
<IconContainer
6868
isDisabled={isDisabled}
6969
selected={selected}
70+
as="button"
71+
aria-label={name}
7072
onClick={() => {
7173
if (selected) {
7274
setWorkspaceHidden({ hidden: true });
@@ -76,7 +78,7 @@ const IconComponent: FunctionComponent<IconProps> = ({
7678
}
7779
}}
7880
>
79-
<Icon />
81+
<Icon aria-hidden />
8082
</IconContainer>
8183
</Tooltip>
8284
);
@@ -96,7 +98,12 @@ export const Navigation: FunctionComponent<Props> = ({
9698
const disabledItems = getDisabledItems(state);
9799

98100
return (
99-
<Container topOffset={topOffset} bottomOffset={bottomOffset}>
101+
<Container
102+
topOffset={topOffset}
103+
bottomOffset={bottomOffset}
104+
as="nav"
105+
aria-label="Sandbox Navigation"
106+
>
100107
{shownItems.map(item => (
101108
<IconComponent key={item.id} item={item} />
102109
))}

packages/app/src/app/pages/Sandbox/Editor/Navigation/elements.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export const IconContainer = styled.div<{
4242
props.theme[`activityBar.inactiveForeground`] ||
4343
css`rgba(255, 255, 255, 0.5)`};
4444
cursor: pointer;
45+
background: transparent;
46+
border: 0;
47+
appearance: none;
48+
outline: 0;
4549
4650
&:hover {
4751
color: ${props => props.theme[`activityBar.foreground`] || css`white`};

0 commit comments

Comments
 (0)