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

footer and header element context as landmarks (main element context change from parent to descendant) #65

Closed
jasonkiss opened this issue Oct 12, 2016 · 5 comments
Assignees

Comments

@jasonkiss
Copy link
Contributor

From @jongund on May 6, 2016 15:34

Recommend changing:

"footer (nearest ancestor sectioning content or sectioning root element is not body, or parent is main)"
to
"footer (nearest ancestor sectioning content or sectioning root element is not body or is a descendant of main)"

"footer (nearest ancestor sectioning content or sectioning root element is body)"
to
"footer (nearest ancestor sectioning content or sectioning root element is body and not a descendant of main)"

"header (nearest ancestor sectioning content or sectioning root element is not body, or parent is main)"
to
"header (nearest ancestor sectioning content or sectioning root element is not body or is a descendant of main)"

"header (nearest ancestor sectioning content or sectioning root element is body)"
to
"header (nearest ancestor sectioning content or sectioning root element is body and not a descendant of main)"

Copied from original issue: w3c/aria#362

@jasonkiss jasonkiss self-assigned this Oct 12, 2016
@jasonkiss jasonkiss added the AAM label Oct 12, 2016
@jasonkiss
Copy link
Contributor Author

Getting the language right here is admittedly tricky.

I think you're trying to describe a scenario where the header or footer is not a descendant of main, not that the nearest ancestor sectioning element itself is not a descendant of main, which is how I read the proposed text. So I don't think the proposed text is exactly right.

See also issue #277. How would you feel about the following phrase to define the use of header and footer that should not be landmarks: "descendant of main, or of sectioning content or sectioning root element other than body"?

Conversely, header and footer should be landmarks only where they are "descendant of body but not descendant of main or of other sectioning content or sectioning root element".

@asurkov
Copy link
Contributor

asurkov commented Nov 14, 2016

I'm not sure I clearly understand the wording 'nearest ancestor sectioning content or sectioning root element is body)'. @jasonkiss, could you please explain it, possibly providing some examples?

@jasonkiss
Copy link
Contributor Author

Sorry for the delay, @asurkov.

Also see html issue #520 in case it helps.

That's the existing language used in the HTML-AAM, and I think it is not entirely correct in how it describes the header/footer as landmark scenario. I think that scenario should be written as "nearest ancestor sectioning content or sectioning root element is body, and parent is not main".

When deciding if a header is to be a banner landmark, it all depends on whether or not it is nested within a main element, a sectioning content element (article, aside, nav, section), or a sectioning root element (blockquote, body, details, dialog, fieldset, figure, td). The placement of the header in any of those elements defines the scope for the header, that is what content it is a header for. Find the header's nearest ancestor that matches one of these elements, and if it is body, then it scopes the page as a whole and the header is a landmark, and otherwise it is not.

Does the newer language I propose above work better for you? For example:

  • header (descendant of body but not descendant of main or of other sectioning content or sectioning root element) => Maps to banner landmark
  • header (descendant of main, or of sectioning content or sectioning root element other than body) => Does not map to banner landmark

@jasonkiss
Copy link
Contributor Author

Closing with d7f6d17. If wording needs improvement, we can reopen this one.

jasonkiss added a commit that referenced this issue Dec 14, 2016
Also updated change log to use reverse chronological order
@asurkov
Copy link
Contributor

asurkov commented Dec 22, 2016

@jasonkiss thanks for detailed explanation! I filed issue 77 for further possible improvements #77

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

2 participants