-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Align <main> a bit with contemporary AT #3326
Conversation
The various examples changed here do not lead to a good experience in existing AT and there's no reason to believe AT will change so it seems best to give different advice.
cc @whatwg/a11y |
FWIW, I wrote some additional rationale here (and things to look at to further improve things here): #100 (comment). |
This looks very good to me, it prioritises user needs. With the removal of |
<code>main</code> elements. For example, a page with multiple <code>article</code> elements might | ||
need to indicate the dominant contents of each such element.</p> | ||
<p class="note">While there is no restriction as to the number of <code>main</code> elements in a | ||
document, web developers are encouraged to stick to a single element.</p> |
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.
web developers are encouraged to stick to a single element
Should this say "single visible element" or does that add too much complexity?
One exception to recommending a single <main>
could be in a layered web application where background <main>
elements are properly rendered inert from AT. Blackboard has a good example of this type of UI. https://www.youtube.com/watch?v=6tmBd9USe6g
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.
Since this is just advice, leaving out the edge cases where multiple elements makes sense to me.
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.
Yeah, I was hoping to leave more detailed advice up to a future iteration, once we have more agreement on the edge cases.
<p>The <code>main</code> element can be used as a container for the dominant contents of another | ||
element. It <span>represents</span> its children.</p> | ||
<p>The <code>main</code> element can be used as a container for the dominant contents of the | ||
document. It <span>represents</span> its children.</p> | ||
|
||
<p class="note">The <code>main</code> element is distinct from the <code>section</code> and |
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.
Should this mention of no effect on the document outline for <main>
be removed like line 17273?
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.
I only removed it there because I removed main from the example. This example still uses main though.
<code>main</code> elements. For example, a page with multiple <code>article</code> elements might | ||
need to indicate the dominant contents of each such element.</p> | ||
<p class="note">While there is no restriction as to the number of <code>main</code> elements in a | ||
document, web developers are encouraged to stick to a single element.</p> |
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.
Since this is just advice, leaving out the edge cases where multiple elements makes sense to me.
As mentioned in #100 (comment) developers appreciate clarity. I suggest that if devs are being encouraged to stick to one main element a normative SHOULD requirement is appropriate, which will provide a warning in conformance checkers (ping @sideshowbarker) |
thanks |
@stevefaulkner I think that's where I want to end up as well, but I was thinking it'd be good to make these improvements first as I expect these to be less controversial. |
@annevk good to hear, it is only appears controversial because a few owners of the spec have strong opinions, for almost everybody else in the community including dev's and users it is a sensible change to align the definition with expected usage and user agent expression. So i suggest that sooner rather than later would be preferable. This would, make advice/requirements much clearer for devs to the benefit of users. I think it would then resolve #100 after 2 1/2 years and 100+ of comments. To be clear, suggested changes:
I personally can live with the remaining differences in the original definition not being reflected in the whatwg definition and this would provide an opportunity to align the 2 definitions, to reduce confusion. |
@foolip when we correct prose we don't qualify it as "Editorial", even if it's non-normative prose. "Editorial" is for more trivial changes. |
@annevk, OK then :) Do you want more review/sign-off of this before merging? |
The various examples changed here do not lead to a good experience in existing AT and there's no reason to believe AT will change so it seems best to give different advice.
/grouping-content.html ( diff )
/iframe-embed-object.html ( diff )
/interactive-elements.html ( diff )
/sections.html ( diff )