Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Discussion: aside vs complementary #1396

@carmacleod

Description

@carmacleod

Note: This issue is a proxy for w3c/html-aam#86, but I want to bring the issue to the wider group and discuss how we want to proceed. If we decide to make this change, I can provide PRs for HTML-AAM and HTML-ARIA.


The ARIA definition of complementary says:

A landmark that is designed to be complementary to the main content at a similar level in the DOM hierarchy

The HTML definition of aside says:

The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element… The element can be used for typographical effects like pull quotes or sidebars, for advertising, for groups of nav elements...

Here's the thing: I don't think pull quotes should be landmarks. I don't think sidebars within an article should be landmarks, either.

I think the following points in the APG's guidance for complementary say it well:

  • complementary landmarks should be top level landmarks (e.g. not contained within any other landmarks).
  • If the complementary content is not related to the main content, a more general role should be assigned (e.g. region).

Since HTML aside is more permissive than ARIA complementary, and since aside maps directly to complementary without restriction, authors are defining landmarks that they didn't intend to be landmarks. Possibly lots of them.

Interestingly, axe-core flags a violation for an aside or complementary that is not at the top level. Of course, this means that authors who don't want any axe-core violations can't use asides in the "put 'em anywhere" way defined in the HTML spec... unless they specify some other role on the aside, like perhaps role="presentation" or role="note".

But that puts the onus on authors to know what's going on, understand ARIA, and come up with a work around. More likely, they would just delete any flagged asides and wonder why they misunderstood the HTML spec.

I think the axe-core rule should stay. I think it's a good rule. And I think we can help authors by refining the mapping for the aside element, which I believe would make this better for users of AT.

I propose that we restrict the mapping of aside so that it only maps to complementary if it's a top level landmark (i.e. scoped to the body element), similar to the language for header and footer in HTML-AAM and HTML-ARIA, except that instead of mapping to "No corresponding role" when it's not scoped to the body element, I think it probably makes more sense to map it to role="note". This gives AT the opportunity to announce when entering/leaving the note (some already do), or AT could provide a means for users to skip over the note if desired.

I think this would greatly clarify what asides are and what they are for, and it would reduce the number of frivolous complementary landmarks out there that had no business being landmarks in the first place.

Metadata

Metadata

Assignees

Labels

clarificationclarifying or correcting language that is either confusing, misleading or under-specified

Type

No type

Projects

Status

Scott O'Hara

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions