-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
ARIA form role: exposed if it has an accessible name #29636
Conversation
Preview URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@estelle hrm, I feel like I've made a mountain out of a molehill with this one. Let me know what you think!
@@ -7,7 +7,7 @@ browser-compat: html.elements.form | |||
|
|||
{{HTMLSidebar}} | |||
|
|||
The **`<form>`** [HTML](/en-US/docs/Web/HTML) element represents a document section containing interactive controls for submitting information. | |||
The **`<form>`** [HTML](/en-US/docs/Web/HTML) element represents a document section containing interactive controls for submitting information. The form is not exposed as a landmark region unless it has an [accessible name](/en-US/docs/Glossary/Accessible_name). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks correct to me, but I can't help wondering whether the average reader will have a clue what a landmark region is. Would it be even better to link to something that explains what it is and how to give it an accessible name, and/or provide more clues in the text, for example, something like
The form is not exposed to screen readers as a landmark region unless it has an accessible name provided via the
name
attribute.
?
Also, does a form always need a specific accessible name, or is this only needed in some circumstances, e.g. when you have multiple forms on a page? If there is only one form and the top-level heading for the pages clearly says this page contains a form, isn't it OK to not include this as long as the individual form elements are clearly labelled?
I feel like I'm being horribly picky now, but it seems to me like this statement needs to come with some advice on when this is necessary. And, if it is necessary to always include this, examples on the page and elsewhere need to be updated to align with this advice.
Thanks for the review. This PR was a mistake. I meant to add the sentence to the form role not form element. |
Ah, that makes more sense ;-) |
https://www.w3.org/TR/html-aria/#el-form