Landmarks requirements confusing for target page with no (or multiple) main landmarks
See original GitHub issueDescribe 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.
- In the target page, examine the main landmark to verify that it contains all of the page’s primary content.
- 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:
- 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>
- Start an AIWeb assessment against this page (will need to enable local file usage if not already enabled)
- Observe that automated checks all pass
- Go to “Landmark” test
- Observe confusing text/behavior of “Primary content” and “No repeating content” requirements
- (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:
- Created 3 years ago
- Comments:13 (8 by maintainers)
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”
@dbjorge @ferBonnin, these look good to me: