Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

landmarks.js should also detect roles

Open
#6 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
accessibility

Research direction

Start with lib/dom/accessibility/landmarks.js, which the issue identifies as the landmark-detection entry point. Review how HTML5 landmark elements are detected, then account for the listed WAI-ARIA landmark roles such as banner, main, navigation, and search. Done means elements such as

are detected alongside built-in landmark elements.

Written by the indexing model from the issue text.

Description

Hey @soulgalore! I was reading through the (very clean) source for coach and noticed https://github.com/sitespeedio/coach/blob/master/lib/dom/accessibility/landmarks.js.

It should not only detect HTML5 elements with built-in landmarks, but also landmark roles:

  • [role="application"] - A region declared as a web application, as opposed to a web document.
  • [role="banner"] - A region that contains mostly site-oriented content, rather than page-specific content.
  • [role="complementary"] - A supporting section of the document, designed to be complementary to the main content at a similar level in the DOM hierarchy, but remains meaningful when separated from the main content.
  • [role="contentinfo"]- A large perceivable region that contains information about the parent document.
  • [role="form"] - A landmark region that contains a collection of items and objects that, as a whole, combine to create a form. See related search.
  • [role="main"] - The main content of a document.
  • [role="navigation"] - A collection of navigational elements (usually links) for navigating the document or related documents.
  • [role="search"] - A landmark region that contains a collection of items and objects that, as a whole, combine to create a search facility. See related form.

For example - a landmark tag could be <div role="banner"></div>.

Dominant language
JavaScript
Stars
3
Forks
6
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sitespeedio/coach-core

All issues in sitespeedio/coach-core

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.