Add label for element

This commit is contained in:
2023-11-01 15:46:57 +07:00
parent 145b48452d
commit e39f7ab547
4 changed files with 12 additions and 8 deletions
@@ -13,12 +13,16 @@ const StyledHeaderMenu = styled.ul`
const HeaderMenu = () => { const HeaderMenu = () => {
return ( return (
<StyledHeaderMenu> <StyledHeaderMenu>
<ButtonIcon> <li>
<ButtonIcon aria-label="Profile">
<IoPersonCircleOutline /> <IoPersonCircleOutline />
</ButtonIcon> </ButtonIcon>
<ButtonIcon> </li>
<li>
<ButtonIcon aria-label="Logout">
<HiOutlineLogout /> <HiOutlineLogout />
</ButtonIcon> </ButtonIcon>
</li>
</StyledHeaderMenu> </StyledHeaderMenu>
); );
}; };
@@ -37,7 +37,7 @@ const Toggle = ({ id }: { id: string }): React.JSX.Element => {
}; };
return ( return (
<StyledToggle onClick={handleClick}> <StyledToggle onClick={handleClick} aria-label={`Menu item ${id}`}>
<HiEllipsisVertical /> <HiEllipsisVertical />
</StyledToggle> </StyledToggle>
); );
+1 -1
View File
@@ -19,7 +19,7 @@ const StyledSelect = styled.select`
const Select = ({ options, value, onChange }: ISelect) => { const Select = ({ options, value, onChange }: ISelect) => {
return ( return (
<StyledSelect value={value} onChange={onChange}> <StyledSelect value={value} onChange={onChange} aria-label="Sort">
{options.map((option) => ( {options.map((option) => (
<option value={option.value} key={option.value}> <option value={option.value} key={option.value}>
{option.label} {option.label}