Skip to content

Commit

Permalink
Merge pull request #9666 from jerolimov/odc-6190
Browse files Browse the repository at this point in the history
Bug 1986988: Add button around pipeline builder icon to make popover accessibly via keyboard
  • Loading branch information
openshift-merge-robot committed Jul 29, 2021
2 parents cc8c8a2 + ef35885 commit b0abb0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"Add workspace": "Add workspace",
"Error loading the tasks.": "Error loading the tasks.",
"Unable to locate any tasks.": "Unable to locate any tasks.",
"Open hint": "Open hint",
"Resources aren't in beta, so it is recommended to use workspaces instead.": "Resources aren't in beta, so it is recommended to use workspaces instead.",
"Invalid runAfter": "Invalid runAfter",
"TaskSpec or TaskRef must be provided.": "TaskSpec or TaskRef must be provided.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.opp-pipeline-workspace-suggestion-icon {
height: 1rem;
width: 1rem;
cursor: pointer;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { Popover } from '@patternfly/react-core';
import { Button, ButtonVariant, Popover } from '@patternfly/react-core';
import { InfoCircleIcon } from '@patternfly/react-icons';
import { useTranslation } from 'react-i18next';

Expand All @@ -8,13 +8,16 @@ import './PipelineWorkspaceSuggestionIcon.scss';
const PipelineWorkspaceSuggestionIcon: React.FC = () => {
const { t } = useTranslation();

const ariaLabel = t('pipelines-plugin~Open hint');
const content = t(
"pipelines-plugin~Resources aren't in beta, so it is recommended to use workspaces instead.",
);

return (
<Popover aria-label={content} bodyContent={content}>
<InfoCircleIcon className="opp-pipeline-workspace-suggestion-icon" />
<Button isInline variant={ButtonVariant.link} aria-label={ariaLabel}>
<InfoCircleIcon className="opp-pipeline-workspace-suggestion-icon" />
</Button>
</Popover>
);
};
Expand Down

0 comments on commit b0abb0f

Please sign in to comment.