Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Role on dialog element is required but not recommended #1808

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

Open
sebastianthulin opened this issue Mar 31, 2025 · 1 comment
Open

Role on dialog element is required but not recommended #1808

sebastianthulin opened this issue Mar 31, 2025 · 1 comment

Comments

@sebastianthulin
Copy link

sebastianthulin commented Mar 31, 2025

Dialog elements can never be fully validated because the role is both required and should not be included at the same time.

Error with role (<dialog role="dialog">):
Warning: The dialog role is unnecessary for the element.

Error without role (<dialog>):
Error: The dialog element is missing the required attribute role.

I would state that it cannot be "unnecessary" if it is required.

@scottaohara
Copy link
Contributor

curious. have a markup snippet to share? I ran the below markup in the text input option for the validator and received no error.

<!DOCTYPE html>
<html lang="">
  <head>
    <title>Test</title>
  </head>
  <body>
    <dialog>foo</dialog>
  </body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants