Skip to content

Commit 0731ed8

Browse files
committed
use semantic element
1 parent c2ad33f commit 0731ed8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

packages/app/src/app/pages/Sandbox/Editor/Header/SandboxName/SandboxName.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const SandboxName: FunctionComponent = () => {
106106
) : (
107107
'Anonymous '
108108
)}
109-
/{' '}
109+
<span role="presentation">/ </span>
110110
</Folder>
111111
</animated.div>
112112
)}
@@ -125,10 +125,15 @@ export const SandboxName: FunctionComponent = () => {
125125
onKeyUp={handleKeyUp}
126126
placeholder={name}
127127
value={value}
128+
arial-label="sandbox name"
128129
/>
129130
</Form>
130131
) : (
131-
<Name onClick={owned ? handleNameClick : noop} owned={owned}>
132+
<Name
133+
as={owned ? 'button' : 'span'}
134+
onClick={owned ? handleNameClick : noop}
135+
owned={owned}
136+
>
132137
{sandboxName}
133138
</Name>
134139
)}

packages/app/src/app/pages/Sandbox/Editor/Header/SandboxName/elements.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ export const Name = styled.span<{ owned?: boolean }>`
6565
margin-left: 0.25rem;
6666
cursor: ${owned ? 'pointer' : 'initial'};
6767
text-overflow: ellipsis;
68+
appearance: ${owned ? 'none' : 'initial'};
69+
background: none;
70+
border: 0;
71+
outline: 0;
6872
`}
6973
`;
7074

0 commit comments

Comments
 (0)