Skip to content

Commit

Permalink
a11y: Use header tag for trigger in visual editor (#2128)
Browse files Browse the repository at this point in the history
* Add header tag

* use header tag for trigger

Co-authored-by: zeye <[email protected]>
Co-authored-by: Chris Whitten <[email protected]>
  • Loading branch information
cwhitten and yeze322 authored Mar 5, 2020
1 parent e51dc5a commit 8a17c92
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
titleStyle,
subtitleStyle,
triggerIconStyle,
titleContentStyle,
} from './triggerStyles';

function getLabel(data: any): string {
Expand All @@ -39,9 +40,11 @@ export const Trigger = ({ data, onClick = () => {} }): JSX.Element => {
<div css={triggerContentStyle}>
<div css={titleStyle}>
<Icon iconName="Flow" style={triggerIconStyle} />
<span>{name}</span>
<h4 css={titleContentStyle}>{name}</h4>
</div>
<div css={subtitleStyle} className="trigger__content-label">
{label}
</div>
<div css={subtitleStyle}>{label}</div>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ export const titleStyle: any = {
fontSize: '18px',
lineHeight: '24px',
fontWeight: 600,
display: 'flex',
};

export const titleContentStyle = {
fontWeight: 600,
margin: '0px',
};
export const subtitleStyle: any = {
whiteSpace: 'nowrap',
color: ObiColors.LightGray,
Expand Down

0 comments on commit 8a17c92

Please sign in to comment.