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

aside mapping revisions #350

Merged
merged 7 commits into from
Apr 3, 2022
Merged

aside mapping revisions #350

merged 7 commits into from
Apr 3, 2022

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Oct 29, 2021

closes #86

Treat an aside element similarly to header, footer and section.

map aside to role=complementary if:

  • scoped to main or body elements
  • or given accessible name if scoped to sectioning content or root elements

otherwise, map to role=generic


Preview | Diff


Preview | Diff

closes #86

Treat an `aside` element similarly to `header`, `footer` and `section`.

map `aside` to `role=complementary` if:
* scoped to `main` or `body` elements
* or given accessible name if scoped to sectioning content or root elements

otherwise, scope to `role=generic`
Copy link
Collaborator

@aleventhal aleventhal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there already consensus that it's a good idea?

I don't see any problems from an implementation point of view.

@cookiecrook
Copy link
Collaborator

After a brief internal discussion, we think it’s a reasonable proposal, with a relatively simple implementation. Assuming no objections of merit arise, of course.

@scottaohara
Copy link
Member Author

thanks @cookiecrook, @aleventhal

the tldr; intent of this update is to mitigate against the guidance from ARIA / the ARIA Authoring Practices (and conformance checkers that reference APG) that indicate that a complementary landmark should generally be a top-level landmark, while the HTML specification indicates that use of an <aside> element can be far more permissive.

This change would allow for the <aside> to better handle both sets of authoring use, and then authors that specifically want to make sure an <aside> is exposed as a complementary landmark can still do so by giving it an accessible name, regardless of where it lives in the DOM. Otherwise, it allows authors to continue to use it without unknowingly overpopulating the number of complementary landmarks in the document.

@scottaohara
Copy link
Member Author

test case created

@spectranaut
Copy link
Contributor

spectranaut commented Mar 7, 2022

ok @scottaohara I'm trying to implement this, and using your useful test case, and I ran into a bug in the conditional mapping of footer and header: https://bugs.chromium.org/p/chromium/issues/detail?id=1303917

I'm commenting here, though, because I think there is some lack of clarity in the spec. I couldn't find a definition of "sectioning element" and "sectioning root element"... are those phrases defined in some other spec? Or are they open to interpretation? If a sectioning element means a <section> (or <aside> or whatever the list of "sectioning elements" is) regardless of the ARIA role, for example, then your test case is wrong and the chrome implementation is correct.

Also is "scoped" defined somewhere? Regarding: "footer (scoped to the body or main element)". Trying to read this in order to implement it was difficult, is what I'm getting at. If "scoped" means "has a parent which is...", then a footer in some html might fall under both categories. For example, an <footer> inside an <article> inside of <main>. Could they be worded in a way that more obviously makes it mutually exclusive scenarios?

If neither of these things are defined anywhere, maybe this is the PR to add them? :)

@scottaohara
Copy link
Member Author

scottaohara commented Mar 7, 2022

@spectranaut sectioning contnet and sectioning root are defined in HTML.

But to your point, yes, I think you're right and we need to define 'scoped' here to mitigate this question and help simplify header, footer and now aside which all reference this.

and to be honest, we could probably even simplify that definition, as truly it's not just those elements... but if say a div role=region were to interrupt the descendant relationship of the body and aside, at the element level that would be ok, because a div is generic and doesn't fall into one of those categories. But by an author making it a role=region, that aside should no longer be a role=complementary.

EDIT: apologies. I realized when looking at this that it sure would have helped if I remembered to link to the HTML spec per those terms. Those links have been added in.

adds links to sectioning content and sectioning root, as was done in `header` and `footer`
@spectranaut
Copy link
Contributor

Awesome thanks for adding the links, that helps!

I'm not sure what you are suggesting exactly for simpler categories, but I was just thinking something like:

  1. Aside (scoped to a sectioning content element, or a sectioning root element other than body)
  2. Aside (not scoped to a sectioning content element, or a sectioning root element other than body)

I still don't know if "scoped" is the right word or where the definition for it should go, or if it is self-evident to people other than me?

@scottaohara
Copy link
Member Author

Since it's not an officially defined term as far as i can tell, i'm not opposed to changing it to another word(s) if that makes the most sense. There are other similar terms in ARIA and HTML that sorta fit this concept....

anyway, sent you an email to try and discuss further outside of back and forth issue comments. if that doesn't work for you though, happy to keep at this until we get this sorted.

@stevefaulkner stevefaulkner merged commit 8b8d38c into gh-pages Apr 3, 2022
@scottaohara scottaohara deleted the aside-mapping-updates branch April 5, 2022 15:16
scottaohara added a commit to w3c/aria that referenced this pull request Aug 18, 2022
resolves #1396

Clarifies that complementary content at a 'similar level' could be a sibling to the main content, or a direct child of the main content.  This better aligns with the permissiveness of HTML's `<aside>` element which has no requirements of not being allowed within a `<main>`. 
Related: w3c/html-aam#350
pkra pushed a commit to w3c/aria that referenced this pull request Aug 25, 2022
resolves #1396

Clarifies that complementary content at a 'similar level' could be a sibling to the main content, or a direct child of the main content.  This better aligns with the permissiveness of HTML's `<aside>` element which has no requirements of not being allowed within a `<main>`. 
Related: w3c/html-aam#350
pkra pushed a commit to w3c/aria that referenced this pull request Aug 25, 2022
resolves #1396

Clarifies that complementary content at a 'similar level' could be a sibling to the main content, or a direct child of the main content.  This better aligns with the permissiveness of HTML's `<aside>` element which has no requirements of not being allowed within a `<main>`. 
Related: w3c/html-aam#350
jnurthen pushed a commit to w3c/aria that referenced this pull request Oct 10, 2023
resolves #1396

Clarifies that complementary content at a 'similar level' could be a sibling to the main content, or a direct child of the main content.  This better aligns with the permissiveness of HTML's `<aside>` element which has no requirements of not being allowed within a `<main>`. 
Related: w3c/html-aam#350
Copy link
Collaborator

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

Suggest <aside> should map to complementary with restrictions
5 participants