From 815edb9dfa18c66727feda20d3d24d83036182f5 Mon Sep 17 00:00:00 2001 From: EmreEce Date: Wed, 18 Oct 2023 21:04:52 +0300 Subject: [PATCH] fix(splitbutton): Accessibility does not appear to work as documented #13908 --- .../splitbutton/splitbutton.interface.ts | 15 +++++++++++++ src/app/components/splitbutton/splitbutton.ts | 21 +++++++++++++------ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/app/components/splitbutton/splitbutton.interface.ts b/src/app/components/splitbutton/splitbutton.interface.ts index d52a937c6db..da2a51a4892 100644 --- a/src/app/components/splitbutton/splitbutton.interface.ts +++ b/src/app/components/splitbutton/splitbutton.interface.ts @@ -14,3 +14,18 @@ export interface SplitButtonTemplates { */ dropdownicon(): TemplateRef; } +/** + * Defines ButtonProps interface. + */ +export interface ButtonProps { + ariaLabel?: string; +} +/** + * Defines MenuButtonProps interface. + */ +export interface MenuButtonProps { + ariaLabel?: string; + ariaHasPopup?: boolean; + ariaExpanded?: boolean; + ariaControls?: string; +} \ No newline at end of file diff --git a/src/app/components/splitbutton/splitbutton.ts b/src/app/components/splitbutton/splitbutton.ts index e0b41b14499..6e803c4e7c8 100755 --- a/src/app/components/splitbutton/splitbutton.ts +++ b/src/app/components/splitbutton/splitbutton.ts @@ -5,6 +5,7 @@ import { ButtonModule } from 'primeng/button'; import { ChevronDownIcon } from 'primeng/icons/chevrondown'; import { TieredMenu, TieredMenuModule } from 'primeng/tieredmenu'; import { UniqueComponentId } from 'primeng/utils'; +import { ButtonProps, MenuButtonProps } from './splitbutton.interface'; type SplitButtonIconPosition = 'left' | 'right'; /** @@ -16,12 +17,12 @@ type SplitButtonIconPosition = 'left' | 'right'; template: `
- - +