Skip to content

Dialog: headerTemplate should receive ariaLabelledBy in context #19333

@chdanielmueller

Description

@chdanielmueller

Describe the bug

When creating a custom header template, I need to properly set the id attribute to match the ariaLabelledBy reference used in the dialog's aria-labelledby attribute. Without access to this value, the accessibility relationship between the dialog and its label cannot be maintained.

Pull Request Link

#19334

Reproducer

https://primeng.org/dialog#template

Environment

Any

Angular version

21

PrimeNG version

v21

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  • Search for an item with the id of the aria-labelledby attribute on the div with role="dialog".
  • It does not exist.

Expected behavior

The ariaLabelledBy value should be passed to the header template context, allowing developers to create accessible custom headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: AccessibilityIssue or pull request is related to WCAG or ARIALTS-PORTABLEIssue's fix will be ported to supported LTS versionsType: EnhancementIssue contains an enhancement related to a specific component. Additional functionality has been add

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions