Skip to content

Commit

Permalink
Merge pull request #5753 from gooddata/SHA_master
Browse files Browse the repository at this point in the history
fix: add aria label to dropdown button
  • Loading branch information
scavnickyj authored Jan 6, 2025
2 parents 40ef4c1 + 6050f89 commit 06eeece
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions libs/sdk-ui-kit/api/sdk-ui-kit.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,8 @@ export interface IDropdownBodyRenderProps {

// @internal (undocumented)
export interface IDropdownButtonProps {
// (undocumented)
ariaLabel?: string;
// (undocumented)
children?: ReactNode;
// (undocumented)
Expand Down
5 changes: 4 additions & 1 deletion libs/sdk-ui-kit/src/Dropdown/DropdownButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// (C) 2007-2024 GoodData Corporation
// (C) 2007-2025 GoodData Corporation
import React, { ReactNode } from "react";
import cx from "classnames";
import { Button } from "../Button/Button.js";
Expand All @@ -12,6 +12,7 @@ export interface IDropdownButtonProps {

value?: ReactNode;
title?: string;
ariaLabel?: string;
disabled?: boolean;

isOpen?: boolean;
Expand All @@ -32,6 +33,7 @@ export const DropdownButton: React.FC<IDropdownButtonProps> = ({

value,
title = value,
ariaLabel,
disabled,

isOpen,
Expand All @@ -57,6 +59,7 @@ export const DropdownButton: React.FC<IDropdownButtonProps> = ({
<Button
id={id}
title={title && typeof title === "string" ? title : undefined}
ariaLabel={ariaLabel}
className={buttonClasses}
value={value}
iconLeft={iconLeft}
Expand Down

0 comments on commit 06eeece

Please sign in to comment.