A11yance / aria-query

Programmatic access to the ARIA specification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for landmark roles

darekkay opened this issue · comments

Hello,
as described in this issue from dom-testing-library, the <header> element role is not identified correctly. According to the specs, the implicit role for <header> is banner.

As noticed by @OCmilo, aria-query does not handle any landmark roles. Is there a plan to support them? I could also have a look into this.

Sorry, I should have checked the PRs in more detail first. It seems to be addressed in #46 already. Looking forward to it!

@darekkay #46 landed today. Working on a release within the next week.

@jessebeach thanks for all the hard work! However, the issue is still reproducable. The banner role file does not include any header reference. It should work similar to contentinfo, but with slightly different constraints:

  1. The HTML header element defines a banner landmark when its context is the body element.
  2. The HTML header element is not considered a banner landmark when it is descendant of any of following elements:
  • article
  • aside
  • main
  • nav
  • section

I think this line is the main problem - it should be header instead of banner, then the mapping works correctly. However, the other constraints have to be added to fully fulfil the ARIA specs. This requires much more work, though.

Can you please re-open the issue?