Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(packages/sui-studio): improve sui-studio accessibility lighthouse metrics #1887

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/sui-studio/src/components/demo/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
display: flex;
flex: 1;
flex-direction: column;
padding: 16px;

&-codeButton,
&-fullScreenButton {
Expand All @@ -20,7 +19,7 @@
&-fullScreenButton {
@include breakpoint-from(s) {
bottom: auto;
top: 65px;
top: 5px;
}
}

Expand Down
6 changes: 5 additions & 1 deletion packages/sui-studio/src/components/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ export default class Demo extends Component {
<ThemesButtons themes={themes} selected={themeSelectedIndex} onThemeChange={this.handleThemeChange} />
</div>

<button className="sui-StudioDemo-fullScreenButton" onClick={this.handleFullScreen}>
<button
className="sui-StudioDemo-fullScreenButton"
onClick={this.handleFullScreen}
aria-label={isFullScreen ? 'see in full screen' : 'close full screen mode'}
>
{isFullScreen ? iconFullScreenExit : iconFullScreen}
</button>

Expand Down
2 changes: 1 addition & 1 deletion packages/sui-studio/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function Layout({children}) {
return (
<section className="sui-Studio">
<div className="sui-Studio-navHeader">
<button className="sui-Studio-navMenu" onClick={handleClickMenu}>
<button className="sui-Studio-navMenu" onClick={handleClickMenu} aria-label="Menu">
{iconMenu}
</button>
<Link to="/">
Expand Down
1 change: 1 addition & 0 deletions packages/sui-studio/src/components/preview/_style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.sui-StudioPreview {
padding: 16px;
&-error {
background-color: #c10000;
color: #f0f0f0;
Expand Down
34 changes: 18 additions & 16 deletions packages/sui-studio/src/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<!DOCTYPE html>
<head>
<title>SUI Studio</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1"
/>
<script defer src="https://unpkg.com/@babel/[email protected]/babel.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.0/codemirror.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.0/mode/javascript/javascript.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.0/codemirror.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.0/theme/material.min.css" />
</head>
<body>
<div id="root"></div>
</body>
<html lang="en">
<head>
<title>SUI Studio</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5" />
<script defer src="https://unpkg.com/@babel/[email protected]/babel.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.0/codemirror.min.js"></script>
<script
defer
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.0/mode/javascript/javascript.min.js"
></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.0/codemirror.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.0/theme/material.min.css" />
</head>
<body>
<div id="root" />
</body>
</html>
3 changes: 3 additions & 0 deletions packages/sui-studio/src/styles/components/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@

margin: 0;
padding: 0;
display: inline-flex;

&--small {
font-size: 80%;
margin-right: 16px;
min-height: 30px;
}

&-tab {
display: inline-block;
list-style: none;
margin: 0;
padding: 0;
height: 100%;
}

&-button {
Expand Down
Loading