- {iconButtons.map(({ Icon, onClick, isActive }, index) => {
+ {iconButtons.map(({ Icon, onClick, isActive, ariaLabel }, index) => {
const position: FloatingIconButtonPosition =
iconButtons.length === 1
? 'standalone'
@@ -46,6 +47,7 @@ export const FloatingIconButtonGroup = ({
applyBlur={false}
applyShadow={false}
Icon={Icon}
+ ariaLabel={ariaLabel}
onClick={onClick}
position={position}
size={size}
diff --git a/packages/twenty-ui/src/input/FloatingIconButtonGroup/__stories__/FloatingIconButtonGroup.stories.tsx b/packages/twenty-ui/src/input/FloatingIconButtonGroup/__stories__/FloatingIconButtonGroup.stories.tsx
index d2082db341..df66da9303 100644
--- a/packages/twenty-ui/src/input/FloatingIconButtonGroup/__stories__/FloatingIconButtonGroup.stories.tsx
+++ b/packages/twenty-ui/src/input/FloatingIconButtonGroup/__stories__/FloatingIconButtonGroup.stories.tsx
@@ -1,6 +1,7 @@
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { IconCheckbox, IconNotes, IconTimelineEvent } from '@ui/icon';
import {
+ A11Y_DEFER_COLOR_CONTRAST,
CatalogDecorator,
type CatalogStory,
ComponentDecorator,
@@ -13,9 +14,9 @@ const meta: Meta
= {
component: FloatingIconButtonGroup,
args: {
iconButtons: [
- { Icon: IconNotes },
- { Icon: IconCheckbox },
- { Icon: IconTimelineEvent },
+ { Icon: IconNotes, ariaLabel: 'Notes' },
+ { Icon: IconCheckbox, ariaLabel: 'Tasks' },
+ { Icon: IconTimelineEvent, ariaLabel: 'Timeline' },
],
},
argTypes: {
@@ -27,8 +28,6 @@ export default meta;
type Story = StoryObj;
export const Default: Story = {
- // TODO(a11y): violations inherited from deprecated story; fix during a11y pass
- parameters: { a11y: { test: 'todo' } },
args: {
size: 'small',
},
@@ -40,8 +39,7 @@ export const Catalog: CatalogStory = {
size: { control: false },
},
parameters: {
- // TODO(a11y): violations inherited from deprecated story; fix during a11y pass
- a11y: { test: 'todo' },
+ a11y: A11Y_DEFER_COLOR_CONTRAST,
pseudo: { hover: ['.hover'], active: ['.pressed'], focus: ['.focus'] },
catalog: {
dimensions: [
diff --git a/packages/twenty-ui/src/input/IconButton/__stories__/IconButton.stories.tsx b/packages/twenty-ui/src/input/IconButton/__stories__/IconButton.stories.tsx
index ba5f1acc78..5fc52f1974 100644
--- a/packages/twenty-ui/src/input/IconButton/__stories__/IconButton.stories.tsx
+++ b/packages/twenty-ui/src/input/IconButton/__stories__/IconButton.stories.tsx
@@ -1,6 +1,7 @@
import { type Meta, type StoryObj } from '@storybook/react-vite';
import { IconSearch } from '@ui/icon';
import {
+ A11Y_DEFER_COLOR_CONTRAST,
CatalogDecorator,
type CatalogStory,
ComponentDecorator,
@@ -22,8 +23,6 @@ export default meta;
type Story = StoryObj;
export const Default: Story = {
- // TODO(a11y): violations inherited from deprecated story; fix during a11y pass
- parameters: { a11y: { test: 'todo' } },
args: {
size: 'small',
variant: 'primary',
@@ -32,12 +31,13 @@ export const Default: Story = {
focus: false,
position: 'standalone',
Icon: IconSearch,
+ ariaLabel: 'Search',
},
decorators: [ComponentDecorator],
};
export const Catalog: CatalogStory = {
- args: { Icon: IconSearch },
+ args: { Icon: IconSearch, ariaLabel: 'Search' },
argTypes: {
size: { control: false },
variant: { control: false },
@@ -48,8 +48,7 @@ export const Catalog: CatalogStory = {
position: { control: false },
},
parameters: {
- // TODO(a11y): violations inherited from deprecated story; fix during a11y pass
- a11y: { test: 'todo' },
+ a11y: A11Y_DEFER_COLOR_CONTRAST,
pseudo: { hover: ['.hover'], active: ['.pressed'] },
catalog: {
dimensions: [
@@ -109,7 +108,7 @@ export const Catalog: CatalogStory = {
};
export const PositionCatalog: CatalogStory = {
- args: { Icon: IconSearch },
+ args: { Icon: IconSearch, ariaLabel: 'Search' },
argTypes: {
size: { control: false },
variant: { control: false },
@@ -120,8 +119,7 @@ export const PositionCatalog: CatalogStory = {
Icon: { control: false },
},
parameters: {
- // TODO(a11y): violations inherited from deprecated story; fix during a11y pass
- a11y: { test: 'todo' },
+ a11y: A11Y_DEFER_COLOR_CONTRAST,
pseudo: { hover: ['.hover'], active: ['.pressed'] },
catalog: {
dimensions: [
diff --git a/packages/twenty-ui/src/input/IconButtonGroup/IconButtonGroup.tsx b/packages/twenty-ui/src/input/IconButtonGroup/IconButtonGroup.tsx
index 1f8cf134ee..3c1ddf9e53 100644
--- a/packages/twenty-ui/src/input/IconButtonGroup/IconButtonGroup.tsx
+++ b/packages/twenty-ui/src/input/IconButtonGroup/IconButtonGroup.tsx
@@ -10,6 +10,7 @@ export type IconButtonGroupProps = {
disabled?: boolean;
iconButtons: {
Icon: IconComponent;
+ ariaLabel?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onClick?: (event: MouseEvent) => void;
}[];
@@ -26,11 +27,12 @@ export const IconButtonGroup = ({
className={clsx(styles.container, className)}
data-disabled={disabled || undefined}
>
- {iconButtons.map(({ Icon, onClick }, index) => {
+ {iconButtons.map(({ Icon, onClick, ariaLabel }, index) => {
return (
diff --git a/packages/twenty-ui/src/input/IconButtonGroup/__stories__/IconButtonGroup.stories.tsx b/packages/twenty-ui/src/input/IconButtonGroup/__stories__/IconButtonGroup.stories.tsx
index fc6fc25985..bd3de6d1e7 100644
--- a/packages/twenty-ui/src/input/IconButtonGroup/__stories__/IconButtonGroup.stories.tsx
+++ b/packages/twenty-ui/src/input/IconButtonGroup/__stories__/IconButtonGroup.stories.tsx
@@ -13,9 +13,9 @@ const meta: Meta = {
component: IconButtonGroup,
args: {
iconButtons: [
- { Icon: IconNotes },
- { Icon: IconCheckbox },
- { Icon: IconTimelineEvent },
+ { Icon: IconNotes, ariaLabel: 'Notes' },
+ { Icon: IconCheckbox, ariaLabel: 'Tasks' },
+ { Icon: IconTimelineEvent, ariaLabel: 'Timeline' },
],
},
argTypes: {
@@ -27,8 +27,6 @@ export default meta;
type Story = StoryObj;
export const Default: Story = {
- // TODO(a11y): violations inherited from deprecated story; fix during a11y pass
- parameters: { a11y: { test: 'todo' } },
args: {
disabled: false,
},
@@ -40,8 +38,6 @@ export const Catalog: CatalogStory = {
disabled: { control: false },
},
parameters: {
- // TODO(a11y): violations inherited from deprecated story; fix during a11y pass
- a11y: { test: 'todo' },
catalog: {
dimensions: [
{
diff --git a/packages/twenty-ui/src/input/InsideButton/InsideButton.tsx b/packages/twenty-ui/src/input/InsideButton/InsideButton.tsx
index e24853c31f..1c2595debf 100644
--- a/packages/twenty-ui/src/input/InsideButton/InsideButton.tsx
+++ b/packages/twenty-ui/src/input/InsideButton/InsideButton.tsx
@@ -9,6 +9,7 @@ import styles from './InsideButton.module.scss';
export type InsideButtonProps = {
className?: string;
Icon?: IconComponent;
+ ariaLabel?: string;
onClick?: (event: React.MouseEvent) => void;
disabled?: boolean;
};
@@ -16,6 +17,7 @@ export type InsideButtonProps = {
export const InsideButton = ({
className,
Icon,
+ ariaLabel,
onClick,
disabled = false,
}: InsideButtonProps) => {
@@ -24,6 +26,7 @@ export const InsideButton = ({
return (