Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

splitbutton: Accessibility does not appear to work as documented #13908

Closed
ppc-harmoney opened this issue Oct 18, 2023 · 0 comments · Fixed by #13921
Closed

splitbutton: Accessibility does not appear to work as documented #13908

ppc-harmoney opened this issue Oct 18, 2023 · 0 comments · Fixed by #13921
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ppc-harmoney
Copy link
Contributor

ppc-harmoney commented Oct 18, 2023

Describe the bug

Our application requires WCAG compliance. I am currently trying to add aria-labels to a splitButton component, for which I am following the documentation.

    <p-splitButton
        *ngIf="shouldShowSplit"
        [model]="menuItems"
        (onClick)="onAddClicked()"
        label="{{ 'BUTTON.add' | translate }}"
        buttonProps="{'aria-label': 'Add document'}"
        menuButtonProps="{'aria-label': 'More upload options'}"
        styleClass="split-button p-button-lg"
        menuStyleClass="split-button-menu"
        appendTo="body"
    />

However, I do not see these changes reflected in the DOM. Testing using a screenreader also indicates that these attributes were not set. Furthermore, when trying to bind with a template expression (i.e. square brackets) the compiler complains that these properties do not exist on the splitButton.

Environment

Angular 16.2.9

Cannot set up a test case because the issue template appears to be broken.

Reproducer

No response

Angular version

16.2.9

PrimeNG version

16.5.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.2

Browser(s)

No response

Steps to reproduce the behavior

Add buttonProps/menuButtonProps to p-splitButton

Expected behavior

I would expect to see the aria-label properties on the corresponding elements.

@ppc-harmoney ppc-harmoney added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 18, 2023
@cetincakiroglu cetincakiroglu added Component: Accessibility Issue or pull request is related to WCAG or ARIA and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Oct 25, 2023
@cetincakiroglu cetincakiroglu added this to the 16.6.0 milestone Oct 25, 2023
@cetincakiroglu cetincakiroglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants