add header accessibility in create

Signed-off-by: miguelrambalt <v-migueramirez@expediagroup.com>
This commit is contained in:
miguelrambalt
2021-04-08 11:47:54 -05:00
parent bc1afaf9f4
commit ea677c0361
2 changed files with 16 additions and 3 deletions
@@ -66,7 +66,12 @@ const DefaultTitle = ({
title = 'Unknown page',
className,
}: DefaultTitleProps) => (
<Typography variant="h4" className={className} data-testid="header-title">
<Typography
variant="h4"
component="h2"
className={className}
data-testid="header-title"
>
{title}
</Typography>
);
@@ -77,8 +77,16 @@ export const ItemCardHeader = (props: ItemCardHeaderProps) => {
const classes = useStyles(props);
return (
<div className={classes.root}>
{subtitle && <Typography variant="subtitle2">{subtitle}</Typography>}
{title && <Typography variant="h6">{title}</Typography>}
{subtitle && (
<Typography variant="subtitle2" component="h3">
{subtitle}
</Typography>
)}
{title && (
<Typography variant="h6" component="h4">
{title}
</Typography>
)}
{children}
</div>
);