Skip to content

Commit

Permalink
feat(Popup): add aria-label & aria-labelledby attributes
Browse files Browse the repository at this point in the history
Fixes #1201
  • Loading branch information
ogonkov authored Dec 14, 2023
1 parent 67ba981 commit d924119
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export interface PopupProps extends DOMProps, LayerExtendableProps, PopperProps,
contentClassName?: string;
restoreFocus?: boolean;
restoreFocusRef?: React.RefObject<HTMLElement>;
'aria-label'?: React.AriaAttributes['aria-label'];
'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
role?: React.AriaRole;
id?: string;
focusTrap?: boolean;
Expand Down Expand Up @@ -75,6 +77,8 @@ export function Popup({
qa,
restoreFocus,
restoreFocusRef,
'aria-label': ariaLabel,
'aria-labelledby': ariaLabelledBy,
role,
id,
focusTrap = false,
Expand Down Expand Up @@ -138,6 +142,8 @@ export function Popup({
data-qa={qa}
id={id}
role={role}
aria-label={ariaLabel}
aria-labelledby={ariaLabelledBy}
>
<FocusTrap enabled={focusTrap && open} disableAutoFocus={!autoFocus}>
{/* FIXME The onClick event handler is deprecated and should be removed */}
Expand Down

0 comments on commit d924119

Please sign in to comment.