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

chore(icon): Remove clickable prop and set icons as decorative by default #2181

Conversation

rivka-ungar
Copy link
Contributor

@rivka-ungar rivka-ungar requested a review from a team as a code owner June 23, 2024 16:17
Copy link
Member

@talkor talkor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep the aria-label 🙆🏼‍♂️

packages/core/docs/vibe-3-changelog.md Outdated Show resolved Hide resolved
iconType = IconType.SVG,
iconSize = 16,
ignoreFocusStyle = false,
tabindex: externalTabIndex,
ariaHidden,
ariaHidden = true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it always be true?

@@ -31,13 +31,13 @@ export const Overview = {
};

export const VibeIcon = {
render: () => <Icon iconType={Icon.type.SVG} icon={Bolt} iconLabel="my bolt svg icon" iconSize={16} />,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aria-label shouldn't be added for non-interactive elements, right? I wonder why has it been added here in the first place

<Icon
clickable={false}
icon={DropdownChevronRight}
iconLabel={iconLabel}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though it's not clickable, it has a functionality, it's the arrow for the submenu, I think it should remain since it will imply that it opens the submenu. So I think that the aria-label should remain nevertheless

@@ -137,7 +137,7 @@ describe("TextField Tests", () => {
);
});

const icon = queryByLabelText(iconNames.primary);
const icon = queryByTestId("icon");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is has a const somewhere

Co-authored-by: Tal Koren <talko@monday.com>
@@ -54,18 +54,6 @@ const AttentionBox: React.FC<AttentionBoxProps> & {
"data-testid": dataTestId,
closeButtonAriaLabel = "Close"
}) => {
const iconLabel = useMemo(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this was redundant in terms of a11y?

@@ -118,7 +116,6 @@ const TextField: VibeComponent<TextFieldProps, unknown> & {
inputAriaLabel,
searchResultsContainerId = "",
activeDescendant = "",
iconsNames = EMPTY_OBJECT,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a prop? What is this for?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is and is redundant it should be also documented, and make sure it doesn't have UX implications

@@ -69,12 +69,11 @@ exports[`Dropdown renders correctly snapshot driver should open menu on click if
class="dropdown-indicator css-1pxbrck-indicatorContainer"
>
<svg
aria-hidden="false"
class="icon clickable"
aria-hidden="true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure about this?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants