diff --git a/.eslintrc b/.eslintrc index 3d3cae6a0fd..c70c9f3ebf8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -67,7 +67,7 @@ // we should fix them one by one and mark them as errors // once they're all fixed, we can remove them all and instead extend the strict preset // with "extends": ["plugin:jsx-a11y/strict"] - "jsx-a11y/alt-text": "off", + "jsx-a11y/alt-text": "error", "jsx-a11y/anchor-has-content": "error", "jsx-a11y/anchor-is-valid": "off", "jsx-a11y/aria-activedescendant-has-tabindex": "error", diff --git a/packages/grafana-ui/src/components/Forms/Legacy/Select/SelectOption.tsx b/packages/grafana-ui/src/components/Forms/Legacy/Select/SelectOption.tsx index ecfa3948e54..c618e71605e 100644 --- a/packages/grafana-ui/src/components/Forms/Legacy/Select/SelectOption.tsx +++ b/packages/grafana-ui/src/components/Forms/Legacy/Select/SelectOption.tsx @@ -17,7 +17,7 @@ export const SelectOption = (props: ExtendedOptionProps) => { return (
- {data.imgUrl && } + {data.imgUrl && }
{children}
{data.description &&
{data.description}
} diff --git a/packages/grafana-ui/src/components/Forms/Legacy/Select/__snapshots__/SelectOption.test.tsx.snap b/packages/grafana-ui/src/components/Forms/Legacy/Select/__snapshots__/SelectOption.test.tsx.snap index 8146572a82d..157d8ca4818 100644 --- a/packages/grafana-ui/src/components/Forms/Legacy/Select/__snapshots__/SelectOption.test.tsx.snap +++ b/packages/grafana-ui/src/components/Forms/Legacy/Select/__snapshots__/SelectOption.test.tsx.snap @@ -14,6 +14,7 @@ exports[`SelectOption renders correctly 1`] = ` className="gf-form-select-box__desc-option" > diff --git a/packages/grafana-ui/src/components/Table/ImageCell.tsx b/packages/grafana-ui/src/components/Table/ImageCell.tsx index 9c90f009aae..6961be2fe22 100644 --- a/packages/grafana-ui/src/components/Table/ImageCell.tsx +++ b/packages/grafana-ui/src/components/Table/ImageCell.tsx @@ -15,13 +15,13 @@ export const ImageCell: FC = (props) => { return (
- {!hasLinks && } + {!hasLinks && } {hasLinks && ( getCellLinks(field, row) || []}> {(api) => { return (
- +
); }} diff --git a/pkg/build/cmd/rpm.go b/pkg/build/cmd/rpm.go index 9072c50750f..ef5725c959c 100644 --- a/pkg/build/cmd/rpm.go +++ b/pkg/build/cmd/rpm.go @@ -291,7 +291,7 @@ func signRPMRepo(repoRoot string, cfg PublishConfig) error { PrimaryKey: pubKey, PrivateKey: privKey, Identities: map[string]*openpgp.Identity{ - uid.Id: &openpgp.Identity{ + uid.Id: { Name: uid.Name, UserId: uid, SelfSignature: &packet.Signature{ diff --git a/public/app/core/components/AppChrome/TopSearchBar.tsx b/public/app/core/components/AppChrome/TopSearchBar.tsx index 432e7a5d792..0a982eb8e1a 100644 --- a/public/app/core/components/AppChrome/TopSearchBar.tsx +++ b/public/app/core/components/AppChrome/TopSearchBar.tsx @@ -48,7 +48,7 @@ export function TopSearchBar() { {profileNode && ( }> )} diff --git a/public/app/core/components/PermissionList/PermissionListItem.tsx b/public/app/core/components/PermissionList/PermissionListItem.tsx index 6fecca391df..f93b2791107 100644 --- a/public/app/core/components/PermissionList/PermissionListItem.tsx +++ b/public/app/core/components/PermissionList/PermissionListItem.tsx @@ -11,10 +11,10 @@ const setClassNameHelper = (inherited: boolean) => { function ItemAvatar({ item }: { item: DashboardAcl }) { if (item.userAvatarUrl) { - return ; + return User avatar; } if (item.teamAvatarUrl) { - return ; + return Team avatar; } if (item.role === 'Editor') { return ; diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleType.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleType.tsx index 258617c1730..163af5695e8 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleType.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleType.tsx @@ -32,7 +32,7 @@ const RuleType: FC = (props) => { return ( onClick(value)} disabled={disabled}> - + {name} {description} diff --git a/public/app/features/correlations/CorrelationsPage.tsx b/public/app/features/correlations/CorrelationsPage.tsx index a8a17e2046c..d1b8824c13d 100644 --- a/public/app/features/correlations/CorrelationsPage.tsx +++ b/public/app/features/correlations/CorrelationsPage.tsx @@ -184,7 +184,7 @@ const DataSourceCell = memo( return ( - + {value.name} ); diff --git a/public/app/features/dashboard/components/DashboardSettings/PreviewSettings.tsx b/public/app/features/dashboard/components/DashboardSettings/PreviewSettings.tsx index 407c2f96783..2d4f4dffc12 100644 --- a/public/app/features/dashboard/components/DashboardSettings/PreviewSettings.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/PreviewSettings.tsx @@ -70,10 +70,10 @@ export class PreviewSettings extends PureComponent { - + Preview of dashboard in dark theme - + Preview of dashboard in light theme diff --git a/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx b/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx index e281c11f827..b94c7484454 100644 --- a/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx +++ b/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx @@ -11,7 +11,7 @@ export const PubdashFooter = function () { diff --git a/public/app/features/dimensions/editors/FileUploader.tsx b/public/app/features/dimensions/editors/FileUploader.tsx index 7ea6c151039..9a8cf21712d 100644 --- a/public/app/features/dimensions/editors/FileUploader.tsx +++ b/public/app/features/dimensions/editors/FileUploader.tsx @@ -37,7 +37,7 @@ export const FileUploader = ({ mediaType, setFormData, setUpload, error }: Props
{mediaType === MediaType.Icon && } - {mediaType === MediaType.Image && } + {mediaType === MediaType.Image && Preview of the uploaded file}
); diff --git a/public/app/features/dimensions/editors/ResourceCards.tsx b/public/app/features/dimensions/editors/ResourceCards.tsx index afd7e0d6bd1..49aa6ea804c 100644 --- a/public/app/features/dimensions/editors/ResourceCards.tsx +++ b/public/app/features/dimensions/editors/ResourceCards.tsx @@ -40,7 +40,7 @@ function Cell(props: CellProps) { {card.imgUrl.endsWith('.svg') ? ( ) : ( - + )}
{card.label.slice(0, -4)}
diff --git a/public/app/features/dimensions/editors/URLPickerTab.tsx b/public/app/features/dimensions/editors/URLPickerTab.tsx index 5402d2e6112..6cf7ea8df8b 100644 --- a/public/app/features/dimensions/editors/URLPickerTab.tsx +++ b/public/app/features/dimensions/editors/URLPickerTab.tsx @@ -34,7 +34,9 @@ export const URLPickerTab = (props: Props) => {
{mediaType === MediaType.Icon && } - {mediaType === MediaType.Image && newValue && } + {mediaType === MediaType.Image && newValue && ( + Preview of the selected URL + )}
diff --git a/public/app/features/search/components/SearchCard.tsx b/public/app/features/search/components/SearchCard.tsx index d99ddd7b318..b2d6d026f61 100644 --- a/public/app/features/search/components/SearchCard.tsx +++ b/public/app/features/search/components/SearchCard.tsx @@ -130,7 +130,13 @@ export function SearchCard({ editable, item, onTagSelected, onToggleChecked, onC onClick={onCheckboxClick} /> {hasImage ? ( - setHasImage(false)} /> + Dashboard preview setHasImage(false)} + /> ) : (
{item.icon ? ( diff --git a/public/app/features/search/components/SearchCardExpanded.tsx b/public/app/features/search/components/SearchCardExpanded.tsx index c369df0f889..51b72bd4f49 100644 --- a/public/app/features/search/components/SearchCardExpanded.tsx +++ b/public/app/features/search/components/SearchCardExpanded.tsx @@ -33,6 +33,7 @@ export function SearchCardExpanded({ className, imageHeight, imageWidth, item, l {hasImage ? ( Dashboard preview setHasImage(true)} diff --git a/public/app/features/search/page/components/columns.tsx b/public/app/features/search/page/components/columns.tsx index 03a57dce58a..b1c0ab6f79c 100644 --- a/public/app/features/search/page/components/columns.tsx +++ b/public/app/features/search/page/components/columns.tsx @@ -302,7 +302,7 @@ function makeDataSourceColumn( onDatasourceChange(settings.uid); }} > - + {settings.name} ); diff --git a/public/app/features/storage/FileView.tsx b/public/app/features/storage/FileView.tsx index df22b93e951..0405ffe2433 100644 --- a/public/app/features/storage/FileView.tsx +++ b/public/app/features/storage/FileView.tsx @@ -62,7 +62,7 @@ export function FileView({ listing, path, onPathChange, view }: Props) { return ( ); diff --git a/public/app/plugins/datasource/dashboard/DashboardQueryEditor.tsx b/public/app/plugins/datasource/dashboard/DashboardQueryEditor.tsx index 6415142017b..91d18d5e3bf 100644 --- a/public/app/plugins/datasource/dashboard/DashboardQueryEditor.tsx +++ b/public/app/plugins/datasource/dashboard/DashboardQueryEditor.tsx @@ -168,7 +168,7 @@ export function DashboardQueryEditor({ panelData, queries, onChange, onRunQuerie {results.map((target, i) => (
- + {target.refId}:
diff --git a/public/app/plugins/datasource/prometheus/datasource.tsx b/public/app/plugins/datasource/prometheus/datasource.tsx index 41fa69a5faf..166689782aa 100644 --- a/public/app/plugins/datasource/prometheus/datasource.tsx +++ b/public/app/plugins/datasource/prometheus/datasource.tsx @@ -923,6 +923,7 @@ export class PrometheusDatasource {' '} {buildInfo.application ? AppDisplayNames[buildInfo.application] : 'Unknown'} diff --git a/public/app/plugins/panel/timeseries/plugins/annotations/AnnotationTooltip.tsx b/public/app/plugins/panel/timeseries/plugins/annotations/AnnotationTooltip.tsx index 0a6da533d90..51a0f01a149 100644 --- a/public/app/plugins/panel/timeseries/plugins/annotations/AnnotationTooltip.tsx +++ b/public/app/plugins/panel/timeseries/plugins/annotations/AnnotationTooltip.tsx @@ -37,7 +37,7 @@ export const AnnotationTooltip = ({ const ts = {Boolean(annotation.isRegion) ? `${time} - ${timeEnd}` : time}; if (annotation.login && annotation.avatarUrl) { - avatar = ; + avatar = Annotation avatar; } if (annotation.alertId !== undefined && annotation.newState) {