added role and aria labels

This commit is contained in:
Artur Bien
2020-01-27 18:36:00 +01:00
parent f1775c608a
commit 4d533979c8
2 changed files with 4 additions and 1 deletions

View File

@@ -21,12 +21,13 @@ const StyledList = styled.ul`
position: relative;
`;
// TODO keyboard controls
const List = ({ inline, shadow, children, fullWidth, ...otherProps }) => (
<StyledList
inline={inline}
shadow={shadow}
fullWidth={fullWidth}
role='menu'
{...otherProps}
>
{children}

View File

@@ -49,6 +49,8 @@ const ListItem = ({
className={className}
style={style}
onClick={disabled ? undefined : onClick}
role='menuitem'
aria-disabled={disabled.toString()}
{...otherProps}
>
{children}