@innovaccer/design-system
Version:
React components library project for Innovaccer Design System
113 lines (112 loc) • 6.28 kB
TypeScript
import * as React from 'react';
declare type AriaRoleType = React.AriaRole;
interface IProps extends React.AriaAttributes {
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;
role?: AriaRoleType;
tabIndex?: number;
}
declare const useAccessibilityProps: ({ onClick, onKeyDown, role, tabIndex, ...ariaProps }: IProps) => {
"aria-activedescendant"?: string | undefined;
"aria-atomic"?: boolean | "false" | "true" | undefined;
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
"aria-busy"?: boolean | "false" | "true" | undefined;
"aria-checked"?: boolean | "false" | "true" | "mixed" | undefined;
"aria-colcount"?: number | undefined;
"aria-colindex"?: number | undefined;
"aria-colspan"?: number | undefined;
"aria-controls"?: string | undefined;
"aria-current"?: boolean | "step" | "false" | "true" | "page" | "location" | "date" | "time" | undefined;
"aria-describedby"?: string | undefined;
"aria-details"?: string | undefined;
"aria-disabled"?: boolean | "false" | "true" | undefined;
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
"aria-errormessage"?: string | undefined;
"aria-expanded"?: boolean | "false" | "true" | undefined;
"aria-flowto"?: string | undefined;
"aria-grabbed"?: boolean | "false" | "true" | undefined;
"aria-haspopup"?: boolean | "dialog" | "grid" | "listbox" | "menu" | "tree" | "false" | "true" | undefined;
"aria-hidden"?: boolean | "false" | "true" | undefined;
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
"aria-keyshortcuts"?: string | undefined;
"aria-label"?: string | undefined;
"aria-labelledby"?: string | undefined;
"aria-level"?: number | undefined;
"aria-live"?: "off" | "assertive" | "polite" | undefined;
"aria-modal"?: boolean | "false" | "true" | undefined;
"aria-multiline"?: boolean | "false" | "true" | undefined;
"aria-multiselectable"?: boolean | "false" | "true" | undefined;
"aria-orientation"?: "horizontal" | "vertical" | undefined;
"aria-owns"?: string | undefined;
"aria-placeholder"?: string | undefined;
"aria-posinset"?: number | undefined;
"aria-pressed"?: boolean | "false" | "true" | "mixed" | undefined;
"aria-readonly"?: boolean | "false" | "true" | undefined;
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
"aria-required"?: boolean | "false" | "true" | undefined;
"aria-roledescription"?: string | undefined;
"aria-rowcount"?: number | undefined;
"aria-rowindex"?: number | undefined;
"aria-rowspan"?: number | undefined;
"aria-selected"?: boolean | "false" | "true" | undefined;
"aria-setsize"?: number | undefined;
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
"aria-valuemax"?: number | undefined;
"aria-valuemin"?: number | undefined;
"aria-valuenow"?: number | undefined;
"aria-valuetext"?: string | undefined;
} | {
onKeyDown: (e: React.SyntheticEvent<HTMLElement>) => void;
"aria-activedescendant"?: string | undefined;
"aria-atomic"?: boolean | "false" | "true" | undefined;
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
"aria-busy"?: boolean | "false" | "true" | undefined;
"aria-checked"?: boolean | "false" | "true" | "mixed" | undefined;
"aria-colcount"?: number | undefined;
"aria-colindex"?: number | undefined;
"aria-colspan"?: number | undefined;
"aria-controls"?: string | undefined;
"aria-current"?: boolean | "step" | "false" | "true" | "page" | "location" | "date" | "time" | undefined;
"aria-describedby"?: string | undefined;
"aria-details"?: string | undefined;
"aria-disabled"?: boolean | "false" | "true" | undefined;
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
"aria-errormessage"?: string | undefined;
"aria-expanded"?: boolean | "false" | "true" | undefined;
"aria-flowto"?: string | undefined;
"aria-grabbed"?: boolean | "false" | "true" | undefined;
"aria-haspopup"?: boolean | "dialog" | "grid" | "listbox" | "menu" | "tree" | "false" | "true" | undefined;
"aria-hidden"?: boolean | "false" | "true" | undefined;
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
"aria-keyshortcuts"?: string | undefined;
"aria-label"?: string | undefined;
"aria-labelledby"?: string | undefined;
"aria-level"?: number | undefined;
"aria-live"?: "off" | "assertive" | "polite" | undefined;
"aria-modal"?: boolean | "false" | "true" | undefined;
"aria-multiline"?: boolean | "false" | "true" | undefined;
"aria-multiselectable"?: boolean | "false" | "true" | undefined;
"aria-orientation"?: "horizontal" | "vertical" | undefined;
"aria-owns"?: string | undefined;
"aria-placeholder"?: string | undefined;
"aria-posinset"?: number | undefined;
"aria-pressed"?: boolean | "false" | "true" | "mixed" | undefined;
"aria-readonly"?: boolean | "false" | "true" | undefined;
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
"aria-required"?: boolean | "false" | "true" | undefined;
"aria-roledescription"?: string | undefined;
"aria-rowcount"?: number | undefined;
"aria-rowindex"?: number | undefined;
"aria-rowspan"?: number | undefined;
"aria-selected"?: boolean | "false" | "true" | undefined;
"aria-setsize"?: number | undefined;
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
"aria-valuemax"?: number | undefined;
"aria-valuemin"?: number | undefined;
"aria-valuenow"?: number | undefined;
"aria-valuetext"?: string | undefined;
onClick: (event: React.MouseEvent<HTMLElement>) => void;
role: React.AriaRole;
tabIndex: number;
};
export default useAccessibilityProps;