chore: Add missing labels to buttons without text and search inputs

This commit is contained in:
Tom Moor
2021-01-22 19:31:30 -08:00
parent 6a206de6cd
commit c9fdf48c33
19 changed files with 43 additions and 17 deletions

View File

@@ -145,8 +145,8 @@ function IconPicker({ onOpen, icon, color, onChange }: Props) {
</Label>
<MenuButton {...menu}>
{(props) => (
<Button {...props}>
<Component role="button" color={color} size={30} />
<Button aria-label={t("Show menu")} {...props}>
<Component color={color} size={30} />
</Button>
)}
</MenuButton>

View File

@@ -1,6 +1,7 @@
// @flow
import { observer } from "mobx-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Portal } from "react-portal";
import { withRouter } from "react-router-dom";
import type { Location } from "react-router-dom";
@@ -85,6 +86,7 @@ const useResize = ({ width, minWidth, maxWidth, setWidth }) => {
function Sidebar({ location, children }: Props) {
const theme = useTheme();
const { t } = useTranslation();
const { ui } = useStores();
const previousLocation = usePrevious(location);
@@ -157,7 +159,7 @@ function Sidebar({ location, children }: Props) {
onDoubleClick={handleReset}
$isResizing={isResizing}
>
<ResizeHandle />
<ResizeHandle name={t("Resize sidebar")} />
</ResizeBorder>
)}
</Container>

View File

@@ -21,7 +21,7 @@ function CollapseToggle({ collapsed, ...rest }: Props) {
delay={500}
placement="bottom"
>
<Button {...rest} aria-hidden>
<Button {...rest} tabIndex="-1" aria-hidden>
{collapsed ? (
<NextIcon color="currentColor" />
) : (