Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1986988: Add button around pipeline builder icon to make popover accessibly via keyboard #9666

Merged
merged 1 commit into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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