Repository navigation
Conversation
…erence to match examples
jnurthen
left a comment
There was a problem hiding this comment.
We need to clarify what we state about accessible names for these landmark regions. In my tests title did indeed make these landmarks which matches html-aam.
While we would not want to promote this we should be clear as to what actually happens.
|
@jnurthen |
| <p>Use the HTML <code>aside</code> element to define a <code>complementary</code> landmark.</p> | ||
| <ul> | ||
| <li>The HTML <code>aside</code> element defines a <code>complementary</code> landmark when its context is the <code>body</code> or <code>main</code> element.</li> | ||
| <li>An HTML <code>aside</code> element with a label defines a <code>complementary</code> landmark when its context is an <code>article</code>, <code>aside</code>, <code>nav</code> or <code>section</code> element. A label is defined using <code>aria-labelledby</code> or <code>aria-label</code>.</li> |
There was a problem hiding this comment.
This isn't accurate. An aside with a label will also be complementary when the context is main or body.
I think you mean to say something more like ...
- Aside elements without a label define a complementary landmark only if their context is body or main.
- Aside elements with a lable define a complementary landmark when their context is body, main, article, ....
| </ul> | ||
|
|
||
| <h3>HTML Example: One Complementary Landmark on Page</h3> | ||
| <p>When only one complementary landmark on a page, a label is optional.</p> |
There was a problem hiding this comment.
| <p>When only one complementary landmark on a page, a label is optional.</p> | |
| <p>When there is only one complementary landmark on a page, a label is optional.</p> |
| <li>Use the <code>search</code> landmark instead of the <code>form</code> landmark when the form is used for search functionality.</li> | ||
| <li>A <code>form</code> landmark should have a label to help users understand the purpose of the form.</li> | ||
| <li>A label for the <code>form</code> landmark should be identified using <code>aria-labelledby</code> to visible heading element (e.g. an <code>h1-h6</code> element).</li> | ||
| <li>A label for the <code>form</code> landmark should be identified using <code>aria-labelledby</code> to visible heading element (e.g. an <code>h1-h6</code>) or <code>legend</code> element.</li> |
There was a problem hiding this comment.
seems like there are some words missing from this sentence; it doesn't quite make sense.
It seems to me that this labeling guidance may be overly prescriptive. Perhaps the guidance that a label is helpful is sufficient. Perhaps we could delete this line?
| <p>If a <code>form</code> element has an accessible name it is considered <code>form</code> landmark.</p> | ||
| <ul> | ||
| <li>Use a <code>form</code> element with a label to create a <code>form</code> landmark.</li> | ||
| <li>Use an <code>aria-labelledby</code> reference to visible heading element (e.g. an <code>h1-h6</code>) or <code>legend</code> element for the label.</li> |
There was a problem hiding this comment.
Like above, this seems very prescriptive.
| The use of landmark roles supports keyboard navigation to the structure of a web page for screen reader users and provides targets for author-supplied "skip links" and browser extensions that enhance keyboard navigation. | ||
| </p> | ||
| <p>This section is intended to assist designers, developers and quality assurance staff in defining and understanding the importance of logical, usable, and accessible layout for assistive technologies | ||
| <p>This page is intended to assist designers, developers and quality assurance staff in defining and understanding the importance of logical, usable, and accessible layout for assistive technologies |
There was a problem hiding this comment.
I am not sure how the changes on this page are related to the PR. Is the general idea to better align the content with the practice page? If so, maybe the best thing to do is just delete the page from the examples section with this PR. Then, we only need to modify/review this content in one place.
| <h2>Design Patterns</h2> | ||
| <ul> | ||
| <li>A <code>region</code> landmark must have a label.</li> | ||
| <li>A <code>region</code> landmark must have label using <code>aria-labelledby</code> or <code>aria-label</code>.</li> |
There was a problem hiding this comment.
| <li>A <code>region</code> landmark must have label using <code>aria-labelledby</code> or <code>aria-label</code>.</li> | |
| <li>A <code>region</code> landmark needs to be labeled using <code>aria-labelledby</code> or <code>aria-label</code>.</li> |
| <div class = "tab-content"> | ||
| <div id="tabpanel2" aria-labelledby="tab2" role="tabpanel" class="tab-pane active"> | ||
| <p>Use the HTML <code>section</code> element to define a <code>region</code> landmark.</p> | ||
| <p>Use the HTML <code>section</code> element with a label using <code>aria-labelledby</code> or <code>aria-label</code> to define a <code>region</code> landmark.</p> |
There was a problem hiding this comment.
| <p>Use the HTML <code>section</code> element with a label using <code>aria-labelledby</code> or <code>aria-label</code> to define a <code>region</code> landmark.</p> | |
| <p>to define a <code>region</code> landmark, label an HTML <code>section</code> element with <code>aria-labelledby</code> or <code>aria-label</code>.</p> |
| </div> | ||
| <div id="tabpanel1" aria-labelledby="tab1" role="tabpanel" class="tab-pane"> | ||
| <p>A <code>role="region"</code> attribute is used to define a <code>region</code> landmark.</p> | ||
| <p>Use a <code>role="region"</code> attribute with a label using <code>aria-labelledby</code> or <code>aria-label</code> to define a <code>region</code> landmark.</p> |
There was a problem hiding this comment.
| <p>Use a <code>role="region"</code> attribute with a label using <code>aria-labelledby</code> or <code>aria-label</code> to define a <code>region</code> landmark.</p> | |
| <p>To define a <code>region</code> landmark, set <code>role="region"</code> and specify a label with <code>aria-labelledby</code> or <code>aria-label</code>.</p> |
|
@mcking65 |
| <ul> | ||
| <li>Use the HTML <code>aside</code> element to define a <code>complementary</code> landmark when its context is the <code>body</code> element.</li> | ||
| <li> | ||
| The HTML <code>aside</code> element is <em>not</em> considered a <code>complementary</code> landmark when it is following contexts: |
There was a problem hiding this comment.
This language is used in several places. It is in a passive voice. "is not considered" is vague. Don't we mean that browsers do not create a landmark? Maybe we should change to something like the following ...
| The HTML <code>aside</code> element is <em>not</em> considered a <code>complementary</code> landmark when it is following contexts: | |
| Browsers do not create a complementary landmark when an HTML <code>aside</code> element is in the following contexts: |
Updated based on the HTML Accessibility API Mappings:
asideelement in context ofbodyormainelementasideelement with accessible name in context ofarticle,aside,navorsectionelementPreview updated Complementary Landmark Pages
WAI Preview Link (Last built on Wed, 30 Sep 2026 03:59:53 GMT).