Skip to content

AlertDialog renders without aria-describedby #9916

@nami8824

Description

@nami8824

Provide a general summary of the issue here

When using AlertDialog (with role="alertdialog"), the component renders without aria-describedby.

According to the W3C specification, authors SHOULD use aria-describedby on an alertdialog to reference the alert message element in the dialog.
https://www.w3.org/TR/wai-aria-1.2/#alertdialog

🤔 Expected Behavior?

I think one of the following behaviors should be expected:

  • AlertDialog automatically assigns an ID to the content element and sets aria-describedby on the dialog to reference it.
  • A development warning is shown when a rendered alertdialog lacks aria-describedby

😯 Current Behavior

AlertDialog renders without aria-describedby by default.

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/happy-saha-jtm36v?file=%2Fsrc%2FApp.js%3A26%2C1

Version

3.31.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

macOS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions