Skip to content

Commit

Permalink
Merge HTML tests into MAG guidelines structure
Browse files Browse the repository at this point in the history
  • Loading branch information
joshski committed Nov 30, 2017
1 parent f12be24 commit 8754cf3
Show file tree
Hide file tree
Showing 94 changed files with 1,936 additions and 1,798 deletions.
26 changes: 10 additions & 16 deletions features/cli/display_failing_result.feature
Expand Up @@ -6,11 +6,11 @@ Feature: Display failing result
Then it should fail with:
"""
✗ http://localhost:54321/missing_main_heading.html
* Headings: Exactly one main heading
* Structure: Headings: Exactly one main heading
- Found 0 h1 elements.
For details on how to fix these errors, please see the following pages:
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/html/headings.shtml
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/mobile/structure/headings
"""

Scenario: One standard generates a warning
Expand All @@ -19,13 +19,10 @@ Feature: Display failing result
Then it should fail with:
"""
✓ http://localhost:54321/subheading_first.html
⚠ Headings: Headings must be in ascending order
- First heading was not a main heading: /html/body/h3
⚠ Structure: Headings: Headings must be in ascending order
- First heading was not a main heading: /html/body/h3
For details on how to fix these errors, please see the following pages:
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/html/headings.shtml
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/mobile/structure/headings
"""

Expand All @@ -35,17 +32,14 @@ Feature: Display failing result
Then it should fail with:
"""
✗ http://localhost:54321/two_headings_failures_and_one_warning.html
* Headings: Content must follow headings
- No content follows: /html/body/h2
* Headings: Exactly one main heading
- Found 0 h1 elements.
⚠ Headings: Headings must be in ascending order
- First heading was not a main heading: /html/body/h2
⚠ Structure: Headings: Headings must be in ascending order
- First heading was not a main heading: /html/body/h2
* Structure: Headings: Exactly one main heading
- Found 0 h1 elements.
* Structure: Headings: Content must follow headings
- No content follows: /html/body/h2
For details on how to fix these errors, please see the following pages:
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/html/headings.shtml
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/mobile/structure/headings
"""

Expand All @@ -55,12 +49,12 @@ Feature: Display failing result
Then it should fail with:
"""
✗ http://localhost:54321/heading_and_title_attribute_failures.html
* Headings: Exactly one main heading
* Structure: Headings: Exactly one main heading
- Found 0 h1 elements.
* Title attributes: Title attributes only on inputs
* Text equivalents: Tooltips and supplementary information: Title attributes only on inputs
- Non-input element has title attribute: /html/body/p/span
For details on how to fix these errors, please see the following pages:
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/html/headings.shtml
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/html/title-attributes.shtml
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/mobile/structure/headings
- http://www.bbc.co.uk/guidelines/futuremedia/accessibility/mobile/text-equivalents/tooltips-and-supplementary-information
"""
4 changes: 2 additions & 2 deletions features/cli/display_result_summary.feature
Expand Up @@ -6,15 +6,15 @@ Feature: Display result summary
"""
page("http://localhost:54321/perfect.html")
page("http://localhost:54321/missing_main_heading.html", {
skip: "Headings: Exactly one main heading"
skip: "Structure: Headings: Exactly one main heading"
})
page("http://localhost:54321/missing_main_heading.html?again!")
page("http://localhost:54321/subheading_first.html")
"""
When I run `bbc-a11y`
Then it should fail with:
"""
4 pages checked, 1 error found, 2 warnings, 1 standard skipped
4 pages checked, 1 error found, 1 warning, 1 standard skipped
"""

Scenario: Reminds users to consider usability beyond lint results
Expand Down
2 changes: 1 addition & 1 deletion features/cli/json_reporter.feature
Expand Up @@ -4,7 +4,7 @@ Feature: JSON Reporter
And a file named "a11y.js" with:
"""
page("http://localhost:54321/perfect.html", {
skip: ["Main landmark: Exactly one Main landmark"]
skip: ["Structure: Containers and landmarks: Exactly one main landmark"]
})
page("http://localhost:54321/missing_main_heading.html")
"""
Expand Down
75 changes: 5 additions & 70 deletions features/cli/manual_testing.feature

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions features/cli/skipping_standards.feature
Expand Up @@ -5,7 +5,7 @@ Feature: Skipping Standards
And a file named "a11y.js" with:
"""
page("http://localhost:54321/missing_main_heading.html", {
skip: "Headings: Exactly one main heading"
skip: "Structure: Headings: Exactly one main heading"
})
"""
When I run `bbc-a11y`
Expand All @@ -19,7 +19,7 @@ Feature: Skipping Standards
And a file named "a11y.js" with:
"""
page("http://localhost:54321/two_headings_failures.html", {
only: "Headings: Exactly one main heading"
only: "Structure: Headings: Exactly one main heading"
})
"""
When I run `bbc-a11y`
Expand Down
24 changes: 16 additions & 8 deletions features/cli/summarise_tests.feature
Expand Up @@ -6,15 +6,23 @@ Feature: Summarise Tests
"""
Tests covered by bbc-a11y:
Core purpose: Core purpose must be defined
Type: manual
Fails for each page whose core purpose (to inform, educate, or entertain) is not clearly defined
Minimum text size: Text cannot be too small
Type: automated
Fails for each text node with a computed font size of less than 11px
Colour and meaning: Information conveyed with colour must also be identifiable from context or markup
Type: manual
Fails for each page whose information conveyed with colour is not also identifiable from context or markup
Principles: All documents must have a W3C recommended doctype
Type: automated
Fails for each page that is missing a w3c recommended doctype (e.g. <!DOCTYPE html>)
Principles: Markup must validate against doctype
Type: automated
Fails for each page whose markup does not validate against a w3c standards validator
Principles: Anchors must have hrefs
Type: automated
Fails for each visible <a> element with no href attribute
Colour contrast: Colour combinations must pass the WCAG colour contrast check
Audio & Video: Alternatives for audio and visual content: Alternative delivery for embedded media must be provided
Type: manual
Fails for each page whose colour combinations fail the WCAG colour contrast check
Fails for each page that includes embedded media with no alternative delivery
"""
2 changes: 1 addition & 1 deletion features/disabled_caching.feature
Expand Up @@ -20,6 +20,6 @@ Feature: Disabled Caching
Then it should fail with:
"""
✗ http://localhost:54321/goodThenBad.html
* Headings: Exactly one main heading
* Structure: Headings: Exactly one main heading
- Found 0 h1 elements.
"""
4 changes: 2 additions & 2 deletions features/setting_cookies.feature
Expand Up @@ -27,11 +27,11 @@ Feature: Setting Cookies
✓ http://localhost:54321/good_with_cookie.html
✗ http://localhost:54321/good_with_cookie.html
* Main landmark: Exactly one Main landmark
* Structure: Containers and landmarks: Exactly one main landmark
- Found 0 elements with role="main".
✗ http://localhost:54321/good_with_cookie.html
* Main landmark: Exactly one Main landmark
* Structure: Containers and landmarks: Exactly one main landmark
- Found 0 elements with role="main".
✓ http://localhost:54321/good_with_cookie.html
Expand Down
39 changes: 0 additions & 39 deletions features/standards/html/01_core_purpose.feature

This file was deleted.

79 changes: 0 additions & 79 deletions features/standards/html/02_validation.feature

This file was deleted.

4 changes: 0 additions & 4 deletions features/standards/html/03_progressive_enhancement.feature

This file was deleted.

46 changes: 0 additions & 46 deletions features/standards/html/04_indicating_language.feature

This file was deleted.

0 comments on commit 8754cf3

Please sign in to comment.