-
Notifications
You must be signed in to change notification settings - Fork 322
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
There was a problem hiding this 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 🙆🏼♂️
iconType = IconType.SVG, | ||
iconSize = 16, | ||
ignoreFocusStyle = false, | ||
tabindex: externalTabIndex, | ||
ariaHidden, | ||
ariaHidden = true, |
There was a problem hiding this comment.
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} />, |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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 <[email protected]>
@@ -54,18 +54,6 @@ const AttentionBox: React.FC<AttentionBoxProps> & { | |||
"data-testid": dataTestId, | |||
closeButtonAriaLabel = "Close" | |||
}) => { | |||
const iconLabel = useMemo(() => { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
eef274f
to
7b7affe
Compare
https://monday.monday.com/boards/3532714909/views/80492480/pulses/6887644148