Add missing aria labels (#42532)

This commit is contained in:
Piotr Jamróz 2021-12-01 10:16:09 +01:00 committed by GitHub
parent 143bc5c4ea
commit caf859f498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View File

@ -33,7 +33,7 @@ export function AddGraphiteFunction({ funcDefs }: Props) {
return ( return (
<Segment <Segment
Component={<Button icon="plus" variant="secondary" className={cx(styles.button)} />} Component={<Button icon="plus" variant="secondary" className={cx(styles.button)} aria-label="Add new function" />}
options={options} options={options}
onChange={setValue} onChange={setValue}
inputMinWidth={150} inputMinWidth={150}

View File

@ -50,6 +50,7 @@ function GraphiteQueryEditorContent() {
className={styles.toggleButton} className={styles.toggleButton}
icon="pen" icon="pen"
variant="secondary" variant="secondary"
aria-label="Toggle editor mode"
onClick={() => { onClick={() => {
dispatch(actions.toggleEditorMode()); dispatch(actions.toggleEditorMode());
}} }}

View File

@ -8,5 +8,5 @@ export function PlayButton() {
const onClick = useCallback(() => { const onClick = useCallback(() => {
dispatch(actions.unpause()); dispatch(actions.unpause());
}, [dispatch]); }, [dispatch]);
return <Button icon="play" onClick={onClick} type="button" variant="secondary" />; return <Button icon="play" onClick={onClick} type="button" variant="secondary" aria-label="Unpause query" />;
} }

View File

@ -52,7 +52,7 @@ export function TagsSection({ tags, state }: Props) {
}} }}
loadOptions={debouncedGetTagsAsSegments} loadOptions={debouncedGetTagsAsSegments}
reloadOptionsOnChange={true} reloadOptionsOnChange={true}
Component={<Button icon="plus" variant="secondary" className={styles.button} />} Component={<Button icon="plus" variant="secondary" className={styles.button} aria-label="Add new tag" />}
/> />
)} )}
{state.paused && <PlayButton />} {state.paused && <PlayButton />}