import React from "react";
import { handleKeyboardEvent } from "../handlers";
/**
 * 可访问按钮：将任意内容包裹为带键盘 a11y 的 role="button" 容器
 */ export var AccessibleButton = function AccessibleButton(param) {
    var icon = param.icon, onClick = param.onClick, className = param.className, ariaLabel = param.ariaLabel, id = param.id;
    return /*#__PURE__*/ React.createElement("div", {
        id: id,
        className: className,
        onClick: onClick,
        role: "button",
        tabIndex: 0,
        onKeyDown: function onKeyDown(e) {
            return handleKeyboardEvent(e, onClick);
        },
        "aria-label": ariaLabel
    }, icon);
};
