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

a11y: Accessibility2022 #2777

Merged
merged 6 commits into from
Apr 27, 2020
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
18 changes: 10 additions & 8 deletions Composer/packages/client/src/components/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import composerIcon from '../../images/composerIcon.svg';
import { AppUpdaterStatus } from '../../constants';
import { StoreContext } from '../../store';

import { updateAvailableIcon, headerContainer, title, botName, divider } from './styles';
import { updateAvailableIcon, headerContainer, title, botName, divider, headerTextContainer } from './styles';

export const Header = props => {
const {
Expand All @@ -34,13 +34,15 @@ export const Header = props => {
aria-label={formatMessage('Composer Logo')}
src={composerIcon}
/>
<div css={title}>{formatMessage('Bot Framework Composer')}</div>
{props.botName && (
<Fragment>
<div css={divider} />
<span css={botName}>{`${props.botName} (${props.locale})`}</span>
</Fragment>
)}
<div css={headerTextContainer}>
<div css={title}>{formatMessage('Bot Framework Composer')}</div>
{props.botName && (
<Fragment>
<div css={divider} />
<span css={botName}>{`${props.botName} (${props.locale})`}</span>
</Fragment>
)}
</div>
{showUpdateAvailableIcon && (
<IconButton
iconProps={{ iconName: 'History' }}
Expand Down
14 changes: 9 additions & 5 deletions Composer/packages/client/src/components/Header/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,22 @@ export const headerContainer = css`
`;

export const title = css`
margin-left: 25px;
margin-left: 20px;
font-weight: ${FontWeights.semibold};
font-size: 16px;
color: #fff;
min-width: 200px;
`;

export const botName = css`
margin-left: 15px;
margin-left: 20px;
font-size: 16px;
word-break: break-all;
color: #fff;
`;

export const divider = css`
height: 24px;
border-right: 1px solid #979797;
margin: 0px 0px 0px 4px;
margin: 0px 0px 0px 20px;
`;

export const updateAvailableIcon = {
Expand All @@ -54,3 +52,9 @@ export const updateAvailableIcon = {
backgroundColor: 'transparent',
},
};

export const headerTextContainer = css`
display: flex;
flex-direction: row;
flex-wrap: wrap;
`;