Nothing Special   »   [go: up one dir, main page]

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

Do HTML <form> and <dialog> elements require an accessible name? #2296

Open
gsharpsharp opened this issue Jul 29, 2024 · 2 comments
Open

Do HTML <form> and <dialog> elements require an accessible name? #2296

gsharpsharp opened this issue Jul 29, 2024 · 2 comments

Comments

@gsharpsharp
Copy link
gsharpsharp commented Jul 29, 2024

Describe your concern

In the WAI-ARIA spec, the form and dialog roles are labeled "Accessible Name Required." Does this mean that HTML authors are required to specify an accessible name for <form> and <dialog> elements (e.g. with an aria-label or aria-labelledby attribute) in order to comply with the WAI-ARIA spec?

The question could theoretically be asked about the <img> and <table> elements as well, but it looks like they have other native mechanisms for specifying accessible names as described in HTML Accessibility API Mappings, section 4.1.10 and section 4.1.11 respectively.

(EDIT: Just to clarify, I'm asking if the implicit ARIA semantics of the <form> and <dialog> elements given in the ARIA in HTML specification require these elements to have accessible names as prescribed by the WAI-ARIA specification. I know that the names of the HTML elements and ARIA roles are not directly related.)

Link to the version of the specification or documentation you were looking at at.

Link to documentation: https://w3c.github.io/aria/

Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)? Yes

@stevefaulkner
Copy link
Contributor

In the WAI-ARIA spec, the form and dialog roles are labeled "Accessible Name Required." Does this mean that HTML authors are required to specify an accessible name for

and elements (e.g. with an aria-label or aria-labelledby attribute) in order to comply with the WAI-ARIA spec?

no. What it means is if you use an explicit role.
<div role=“dialog”> for example, you must provide an accessible name. The ARIA spec cannot define conformance requirements for native HTML elements.

@scottaohara
Copy link
Member

to further @stevefaulkner's answer, here's the issue i filed to help correct this common misunderstanding - #2180

scottaohara added a commit that referenced this issue Jul 29, 2024
closes #2180
related to recent question: #2296

This PR removes requiring names for alertdialog, dialog, form, grid, radiogroup and table roles and replaces the author MUST with an author SHOULD. (for grid/table there was no author MUST naming paragraph, so the author SHOULD paragraph was added to these roles).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants