Fix: use type=button in editor (#55731)

This commit is contained in:
Giordano Ricci 2022-09-27 09:20:23 +01:00 committed by GitHub
parent 2bbc7c40e9
commit 4cd4bc84b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -35,6 +35,7 @@ export const QueryEditorRow = ({
aria-pressed={hidden}
aria-label="hide metric"
className={styles.icon}
type="button"
/>
)}
<IconButton
@ -44,6 +45,7 @@ export const QueryEditorRow = ({
onClick={onRemoveClick || noop}
disabled={!onRemoveClick}
aria-label="remove metric"
type="button"
/>
</span>
</InlineLabel>

View File

@ -47,6 +47,7 @@ export const SettingsEditorContainer = ({ label, children, hidden = false }: Pro
className={cx('gf-form-label query-part', styles.button, segmentStyles)}
onClick={() => setOpen(!open)}
aria-expanded={open}
type="button"
>
<Icon name={open ? 'angle-down' : 'angle-right'} aria-hidden="true" className={styles.icon} />
{label}