Skip to content

Should role="complementary" have the same conditional mappings as the corresponding <aside> element? #206

Closed

Description

@sivakusayan

I read through the <aside> conditional mapping PR so I could properly review the Blink PR implementing it. If I'm correctly understanding things, it means that browsers need to make a special distinction between how to map HTML complementary regions and ARIA complementary regions, since ARIA complementary regions are always role="complementary" no matter how they are nested.

Is that extra complexity needed, or would it make sense to simplify things by having the <aside> element unconditionally map to role="complementary", and then have a role="complementary" element conditionally map to a landmark? I see there is precedent for something similar with the role="region" and role="form" mappings, although the spec would need to clarify the ARIA equivalent for "sectioning content".

If it's intended for ARIA and HTML complementary regions to behave differently, then what is the expected behavior when we have an <aside> element nested inside an element with role="region"? I see that the test case has this HTML:

<section role="presentation">
	start of section role=presentation | none
	    <aside class="yes">This aside maps to role=complementary</aside>
	end of section role=presentation | none
</section>

In that case, do we only care about the ARIA role when looking at ancestors?

Activity

  1. scottaohara commented on Oct 26, 2023

    @scottaohara
    Member

    “what is the expected behavior when we have an aside element nested inside an element with role="region"?”

    that is an ambiguity in html aam that exists for this element as well as header and footer which I need to correct. (There is a pr about contextual roles that will address this)

    But to your larger question, the reason aside, header, and footer change their roles is because html’s definition of each element accounts for use cases beyond where their implicit landmark roles are meant to be used. So the html elements need to be mailable to these use cases. Declaring ARIA roles is an explicit action taken by the author, so if someone is using role=complementary, then that’s the role they’re intending to use so it should be exposed as such.

    (I say this knowing that the wg has also talked about what to do for roles that authors are blatantly misusing - Eg role=listitem that is not an a11y child of a list. But this issue is not in scope of that topic)

  2. jnurthen commented on Oct 26, 2023

    @jnurthen
    Member

    Closing based on above discussion and ARIA meeting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions