question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Landmarks requirements confusing for target page with no (or multiple) main landmarks

See original GitHub issue

Describe the bug

The “How to test” info for the Landmarks > Primary content requirement reads:

The visual helper for this requirement highlights the page’s main landmark.

  1. In the target page, examine the main landmark to verify that it contains all of the page’s primary content.
  2. Record your results: a. If you find any failures, select Fail, then add them as failure instances. b. Otherwise, select Pass.

The Getting Started text for landmarks includes this paragraph:

Landmarks are not required, but if you use them, you must use them correctly. Also, if you add Landmarks, you must have a main Landmark.

…however, it’s not clear to me that this is up to date (I’d have expected it to fail an automated check for “contains landmarks but no main landmark”, but it doesn’t, maybe it’s one of the best-practice landmark rules now?), and it’s easy to miss this while going through the Primary content requirement, and the “How to test” text seems to be written assuming that there will always be a main landmark. I was assessing a page without landmarks today and was confused for a while about whether I was supposed to mark this “pass” or “fail”.

Same feedback applies to the “No repeating content” requirement’s text.

I think it would be nice to change the How to test text to something that makes it more clear whether the user should mark pass or fail for target pages that don’t have exactly 1 main landmark. Leaving the exact text change for @ferBonnin / @LiLoDavis to suggest.

If we want these to be marked pass, it would probably be ideal for the requirement to auto-pass if there is no main element, similar to how the Landmark roles requirement auto-passes if there are no landmarks found.

While we’re here it would also be nice to fix the inconsistent use of <Markup> tags with the term “main” in these requirements.

To Reproduce Steps to reproduce the behavior:

  1. Create a local test html file with the following content (can’t use codepen because its visual wrappers have landmarks in them):
  <html lang="en">
      <head>
          <title>Test page</title>
      </head>
      <body>
          <h1>Content</h1>
          <p>Test content.</p>
      </body>
  </html>
  1. Start an AIWeb assessment against this page (will need to enable local file usage if not already enabled)
  2. Observe that automated checks all pass
  3. Go to “Landmark” test
  4. Observe confusing text/behavior of “Primary content” and “No repeating content” requirements
  5. (note: the example html above has no landmarks at all, but the same repro steps apply to a page with some non-main landmarks but no main landmarks, or to a page with multiple main landmarks)

Expected behavior

It should be clear to a user without any background in landmarks usage what they need to do to assess a page with:

  • No landmarks
  • Landmarks, but no main landmarks
  • Multiple main landmarks

Context (please complete the following information)

  • OS Name & Version: any
  • AI-Web Version & Environment: 2.16.0 Production
  • Browser Version: any
  • Target Page: any page without exactly 1 main landmark, see repro above

Are you willing to submit a PR?

yes

Did you search for similar existing issues?

yes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ferBonnincommented, May 4, 2020

Per conversation with Dan, let’s go with option 1 and change the text from: “If no matching/failing instances are found, this requirement will automatically be marked as pass” to “If no landmarks are found, this requirement will automatically be marked as pass”

1reaction
LiLoDaviscommented, May 18, 2020

@dbjorge @ferBonnin, these look good to me:

  • Landmarks > Primary content
  • Landmarks > No repeating content
  • Sequence > CSS positioning
  • Semantics > CSS content
Read more comments on GitHub >

github_iconTop Results From Across the Web

Accessibility rule: Main landmark should not be contained in ...
Best practice dictates that the primary landmark should not be enclosed within another landmark. All content must be contained within discrete areas, ...
Read more >
Main Landmark: ARIA Landmarks Example - W3C
A main landmark identifies the primary content of the page. ... If a page includes more than one main landmark, each should have...
Read more >
Ensures the document has at most one main landmark
If the page contains iframe elements, each iframe should contain either no main landmarks or just one. Ensure all content is contained within...
Read more >
Rule | Document has a landmark with non-repeated content
Therefore, it does not require the main landmark to be visible. Similarly, technique ARIA11: Using ARIA landmarks to identify regions of a page...
Read more >
9. In-page Navigation | Pearson Accessibility Guidelines
There shouldn't be too many landmarks on a page. Just the main 2-6 page sections should be landmarks. The application role changes screen...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found