A11y: Fix prometheus issues (#42671) (#42738)

(cherry picked from commit 8722c19cc3)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-12-09 11:19:53 +01:00
committed by GitHub
co-authored by Ivana Huckova
parent 4806a7ac1e
commit e7669226df
3 changed files with 6 additions and 0 deletions
@@ -101,6 +101,7 @@ export class Select<T> extends PureComponent<LegacySelectProps<T>> {
onOpenMenu,
allowCustomValue,
formatCreateLabel,
'aria-label': ariaLabel,
} = this.props;
let widthClass = '';
@@ -151,6 +152,7 @@ export class Select<T> extends PureComponent<LegacySelectProps<T>> {
onMenuOpen={onOpenMenuInternal}
onMenuClose={onCloseMenuInternal}
tabSelectsValue={tabSelectsValue}
aria-label={ariaLabel}
{...creatableOptions}
/>
);
@@ -161,6 +161,7 @@ export class PromQueryEditor extends PureComponent<PromQueryEditorProps, State>
<input
type="text"
className="gf-form-input width-8"
aria-label="Set lower limit for the step parameter"
placeholder={interval}
onChange={this.onIntervalChange}
onBlur={this.onRunQuery}
@@ -171,6 +172,7 @@ export class PromQueryEditor extends PureComponent<PromQueryEditorProps, State>
<div className="gf-form">
<div className="gf-form-label">Resolution</div>
<Select
aria-label="Select resolution"
menuShouldPortal
isSearchable={false}
options={INTERVAL_FACTOR_OPTIONS}
@@ -189,6 +191,7 @@ export class PromQueryEditor extends PureComponent<PromQueryEditorProps, State>
options={FORMAT_OPTIONS}
onChange={this.onFormatChange}
value={formatOption}
aria-label="Select format"
/>
<Switch label="Instant" checked={instant} onChange={this.onInstantChange} />
@@ -75,6 +75,7 @@ export const PromSettings = (props: Props) => {
HTTP Method
</InlineFormLabel>
<Select
aria-label="Select HTTP method"
menuShouldPortal
options={httpOptions}
value={httpOptions.find((o) => o.value === options.jsonData.httpMethod)}