mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CloudWatch: a11y: Add missing aria labels on explore metrics/logs editor (#43580)
* CloudWatch: a11y: Add missing aria labels on explore metrics/logs editor
This commit is contained in:
parent
a9ad7d3c03
commit
ba58b34219
@ -17,5 +17,5 @@ export const Alias: FunctionComponent<Props> = ({ value = '', onChange }) => {
|
|||||||
propagateOnChange(e.target.value);
|
propagateOnChange(e.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
return <Input type="text" value={alias} onChange={onChange} />;
|
return <Input type="text" value={alias} onChange={onChange} aria-label="Optional alias" />;
|
||||||
};
|
};
|
||||||
|
@ -331,6 +331,7 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
|
|||||||
labelWidth={4}
|
labelWidth={4}
|
||||||
inputEl={
|
inputEl={
|
||||||
<Select
|
<Select
|
||||||
|
aria-label="Region"
|
||||||
menuShouldPortal
|
menuShouldPortal
|
||||||
options={regions}
|
options={regions}
|
||||||
value={selectedRegion}
|
value={selectedRegion}
|
||||||
@ -348,6 +349,7 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
|
|||||||
className="flex-grow-1"
|
className="flex-grow-1"
|
||||||
inputEl={
|
inputEl={
|
||||||
<MultiSelect
|
<MultiSelect
|
||||||
|
aria-label="Log Groups"
|
||||||
menuShouldPortal
|
menuShouldPortal
|
||||||
allowCustomValue={allowCustomValue}
|
allowCustomValue={allowCustomValue}
|
||||||
options={unionBy(availableLogGroups, selectedLogGroups, 'value')}
|
options={unionBy(availableLogGroups, selectedLogGroups, 'value')}
|
||||||
|
@ -38,6 +38,7 @@ export function MetricStatEditor({
|
|||||||
<EditorFieldGroup>
|
<EditorFieldGroup>
|
||||||
<EditorField label="Namespace" width={26}>
|
<EditorField label="Namespace" width={26}>
|
||||||
<Select
|
<Select
|
||||||
|
aria-label="Namespace"
|
||||||
value={query.namespace}
|
value={query.namespace}
|
||||||
allowCustomValue
|
allowCustomValue
|
||||||
options={namespaces}
|
options={namespaces}
|
||||||
@ -50,6 +51,7 @@ export function MetricStatEditor({
|
|||||||
</EditorField>
|
</EditorField>
|
||||||
<EditorField label="Metric name" width={16}>
|
<EditorField label="Metric name" width={16}>
|
||||||
<Select
|
<Select
|
||||||
|
aria-label="Metric name"
|
||||||
value={query.metricName}
|
value={query.metricName}
|
||||||
allowCustomValue
|
allowCustomValue
|
||||||
options={metrics}
|
options={metrics}
|
||||||
|
@ -144,6 +144,7 @@ export class MetricsQueryEditor extends PureComponent<Props, State> {
|
|||||||
tooltip="ID can be used to reference other queries in math expressions. The ID can include numbers, letters, and underscore, and must start with a lowercase letter."
|
tooltip="ID can be used to reference other queries in math expressions. The ID can include numbers, letters, and underscore, and must start with a lowercase letter."
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
|
aria-label="Optional ID"
|
||||||
onBlur={onRunQuery}
|
onBlur={onRunQuery}
|
||||||
onChange={(event: ChangeEvent<HTMLInputElement>) =>
|
onChange={(event: ChangeEvent<HTMLInputElement>) =>
|
||||||
this.onChange({ ...metricsQuery, id: event.target.value })
|
this.onChange({ ...metricsQuery, id: event.target.value })
|
||||||
@ -156,6 +157,7 @@ export class MetricsQueryEditor extends PureComponent<Props, State> {
|
|||||||
|
|
||||||
<EditorField label="Period" width={26} tooltip="Minimum interval between points in seconds.">
|
<EditorField label="Period" width={26} tooltip="Minimum interval between points in seconds.">
|
||||||
<Input
|
<Input
|
||||||
|
aria-label="Period"
|
||||||
value={query.period || ''}
|
value={query.period || ''}
|
||||||
placeholder="auto"
|
placeholder="auto"
|
||||||
onBlur={onRunQuery}
|
onBlur={onRunQuery}
|
||||||
|
@ -82,9 +82,10 @@ const QueryHeader: React.FC<QueryHeaderProps> = ({ query, sqlCodeEditorIsDirty,
|
|||||||
isLoading={regionIsLoading}
|
isLoading={regionIsLoading}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<InlineSelect value={queryMode} options={apiModes} onChange={onQueryModeChange} />
|
<InlineSelect aria-label="Query mode" value={queryMode} options={apiModes} onChange={onQueryModeChange} />
|
||||||
|
|
||||||
<InlineSelect
|
<InlineSelect
|
||||||
|
aria-label="Metric editor mode"
|
||||||
value={metricEditorModes.find((m) => m.value === metricQueryType)}
|
value={metricEditorModes.find((m) => m.value === metricQueryType)}
|
||||||
options={metricEditorModes}
|
options={metricEditorModes}
|
||||||
onChange={({ value }) => {
|
onChange={({ value }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user