fix: More missing a11y labels
This commit is contained in:
parent
11e1108f4a
commit
7e9bcb0c37
|
@ -17,6 +17,8 @@ type Props = {
|
|||
theme: Theme,
|
||||
source: string,
|
||||
placeholder?: string,
|
||||
label?: string,
|
||||
labelHidden?: boolean,
|
||||
collectionId?: string,
|
||||
t: TFunction,
|
||||
};
|
||||
|
@ -68,6 +70,8 @@ class InputSearch extends React.Component<Props> {
|
|||
color={this.focused ? theme.inputBorderFocused : theme.inputBorder}
|
||||
/>
|
||||
}
|
||||
label={this.props.label}
|
||||
labelHidden={this.props.labelHidden}
|
||||
onFocus={this.handleFocus}
|
||||
onBlur={this.handleBlur}
|
||||
margin={0}
|
||||
|
|
|
@ -159,7 +159,7 @@ function Sidebar({ location, children }: Props) {
|
|||
onDoubleClick={handleReset}
|
||||
$isResizing={isResizing}
|
||||
>
|
||||
<ResizeHandle name={t("Resize sidebar")} />
|
||||
<ResizeHandle aria-label={t("Resize sidebar")} />
|
||||
</ResizeBorder>
|
||||
)}
|
||||
</Container>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// @flow
|
||||
import { StarredIcon } from "outline-icons";
|
||||
import * as React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import Document from "models/Document";
|
||||
import NudeButton from "./NudeButton";
|
||||
|
@ -11,6 +12,7 @@ type Props = {|
|
|||
|};
|
||||
|
||||
function Star({ size, document, ...rest }: Props) {
|
||||
const { t } = useTranslation();
|
||||
const handleClick = React.useCallback(
|
||||
(ev: SyntheticEvent<>) => {
|
||||
ev.preventDefault();
|
||||
|
@ -30,7 +32,12 @@ function Star({ size, document, ...rest }: Props) {
|
|||
}
|
||||
|
||||
return (
|
||||
<Button onClick={handleClick} size={size} {...rest}>
|
||||
<Button
|
||||
onClick={handleClick}
|
||||
size={size}
|
||||
aria-label={document.isStarred ? t("Unstar") : t("Star")}
|
||||
{...rest}
|
||||
>
|
||||
<AnimatedStar
|
||||
solid={document.isStarred}
|
||||
size={size}
|
||||
|
|
Reference in New Issue