Skip to content

Commit f6621a1

Browse files
authored
Merge pull request #39 from make-software/bugfix/change-components-to-fix-click-a11y
Change components to fix click a11y
2 parents 6d822d5 + a3186bf commit f6621a1

14 files changed

Lines changed: 3528 additions & 3472 deletions

File tree

dist/cspr-design.es.js

Lines changed: 3414 additions & 3403 deletions
Large diffs are not rendered by default.

dist/cspr-design.umd.js

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/components/confirmation-window/confirmation-window.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/components/copy/copy.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/components/modal-header/modal-header.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lib/components/navigation/cspr-products-menu/products-menu-item.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ export declare const ProductItemWrapper: import('styled-components').StyledCompo
2020
disabled: boolean;
2121
}, never>;
2222
export declare const StyledBodyText: import('styled-components').StyledComponent<React.ForwardRefExoticComponent<import('../../..').BodyTextProps & React.RefAttributes<HTMLSpanElement>>, import('styled-components').DefaultTheme, {}, never>;
23-
export declare const ProductsMenuItem: ({ nameLabel, link, icon, descriptionText, selected, newBadgeLabel, comingSoonBadgeLabel, badge, }: ProductsMenuItemProps) => import("react/jsx-runtime").JSX.Element;
23+
export declare const ProductsMenuItem: React.ForwardRefExoticComponent<ProductsMenuItemProps & React.RefAttributes<HTMLSpanElement>>;
2424
//# sourceMappingURL=products-menu-item.d.ts.map

dist/lib/components/navigation/cspr-products-menu/products-menu-item.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { PropsWithChildren } from 'react';
1+
import { default as React } from 'react';
22
interface DropdownMenuItemProps {
33
onClick?: () => void;
44
padding?: string;
55
}
6-
export declare const DropdownMenuItem: (props: PropsWithChildren<DropdownMenuItemProps>) => import("react/jsx-runtime").JSX.Element;
6+
export declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & {
7+
children?: React.ReactNode | undefined;
8+
} & React.RefAttributes<HTMLSpanElement>>;
79
export {};
810
//# sourceMappingURL=dropdown-menu-item.d.ts.map

dist/lib/components/navigation/dropdown-menu/dropdown-menu-item.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/confirmation-window/confirmation-window.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,28 @@ export const ConfirmationWindow = ({
217217
justify={'space-between'}
218218
>
219219
{dismissLabel && (
220-
<StyledDismissButton color={'utility'} onClick={onDismiss}>
220+
<StyledDismissButton
221+
color={'utility'}
222+
hasOutline
223+
onClick={onDismiss}
224+
tabIndex={0}
225+
onKeyDown={(e) => {
226+
if (e.key === 'Enter') {
227+
onDismiss();
228+
}
229+
}}>
221230
{dismissLabel}
222231
</StyledDismissButton>
223232
)}
224-
<StyledConfirmButton onClick={onConfirm}>
233+
<StyledConfirmButton
234+
onClick={onConfirm}
235+
hasOutline
236+
tabIndex={0}
237+
onKeyDown={(e) => {
238+
if (e.key === 'Enter') {
239+
onConfirm();
240+
}
241+
}}>
225242
{confirmLabel}
226243
</StyledConfirmButton>
227244
</ButtonsContainer>

0 commit comments

Comments
 (0)