Description
Certain HTML elements (main, nav, aside, header, footer, section, form) can have implicit ARIA landmark semantics.
Two of these - section and form - will only have implicit ARIA landmark semantics if they have an accessible name.
- section element will have implied landmark role "region" if it has an accessible name:
role=region if the section element has an accessible name.
- form element will have implied landmark role "form" if it has an accessible name:
role=form if the form element has an accessible name.
At present, the only way to give a section or form element an accessible name is to use either the aria-label
or aria-labelledby
attribute.
This is a problem if a user agent wants to include section and form elements in landmark navigation. User agents shouldn't have to rely on the presence or absence of ARIA markup to determine whether or not to include an element in a new behavior.
The label element can provide an accessible name to form controls like input, select, etc.
Consider allowing it to provide an accessible name for section and form elements as well, so that these elements can participate in landmark navigation.
<label for="settings-section">Settings:</label>
<section id="settings-section"> ... </section>
<label for="contact-info-form">Contact information:</label>
<form id="contact-info-form"> ... </form>
Alternatively, consider allowing the label element to provide an accessible name for all of the landmark elements listed above. All of them are allowed to have an accessible name - it's only section and form that are required to have one in order to be considered landmarks. This would allow for something like:
<label for="site-nav">Site</label>
<nav id="site-nav"> ... </nav>
<label for="page-nav">Page</label>
<nav id="page-nav"> ... </nav>