diff --git a/_config.yml b/_config.yml index 88d412a8895..853e3cd8be0 100644 --- a/_config.yml +++ b/_config.yml @@ -17,8 +17,12 @@ kramdown: collections: rules: output: true + rule-tests: + output: true drafts: output: true + draft-tests: + output: true defaults: - scope: @@ -34,10 +38,22 @@ defaults: path: "" type: drafts values: - layout: draft + layout: rule + draft: true name: undefined rule_id: undefined test_mode: undefined + - scope: + path: "" + type: rule-tests + values: + layout: testcase + - scope: + path: "" + type: draft-tests + values: + layout: testcase + draft: true - scope: path: pages/algorithms values: diff --git a/_data/criteria.json b/_data/criteria.json index 15df947ef31..e521490713c 100644 --- a/_data/criteria.json +++ b/_data/criteria.json @@ -1,6 +1,7 @@ { "1.1.1": { "url": "https://www.w3.org/TR/WCAG20/#text-equiv-all", + "id": "wcag20:text-equiv-all", "num": "1.1.1", "handle": "Non-text Content", "text": "All non-text content that is presented to the user has a text alternative that serves the equivalent purpose, except for the situations listed below.", @@ -39,6 +40,7 @@ }, "1.2.1": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-av-only-alt", + "id": "wcag20:media-equiv-av-only-alt", "num": "1.2.1", "handle": "Audio-only and Video-only (Prerecorded)", "text": "For prerecorded audio-only and prerecorded video-only media, the following are true, except when the audio or video is a media alternative for text and is clearly labeled as such:", @@ -61,6 +63,7 @@ }, "1.2.2": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-captions", + "id": "wcag20:media-equiv-captions", "num": "1.2.2", "handle": "Captions (Prerecorded)", "text": "Captions are provided for all prerecorded audio content in synchronized media, except when the media is a media alternative for text and is clearly labeled as such.", @@ -68,6 +71,7 @@ }, "1.2.3": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-audio-desc", + "id": "wcag20:media-equiv-audio-desc", "num": "1.2.3", "handle": "Audio Description or Media Alternative (Prerecorded)", "text": "An alternative for time-based media or audio description of the prerecorded video content is provided for synchronized media, except when the media is a media alternative for text and is clearly labeled as such.", @@ -75,6 +79,7 @@ }, "1.2.4": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-real-time-captions", + "id": "wcag20:media-equiv-real-time-captions", "num": "1.2.4", "handle": "Captions (Live)", "text": "Captions are provided for all live audio content in synchronized media.", @@ -82,6 +87,7 @@ }, "1.2.5": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-audio-desc-only", + "id": "wcag20:media-equiv-audio-desc-only", "num": "1.2.5", "handle": "Audio Description (Prerecorded)", "text": "Audio description is provided for all prerecorded video content in synchronized media.", @@ -89,6 +95,7 @@ }, "1.2.6": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-sign", + "id": "wcag20:media-equiv-sign", "num": "1.2.6", "handle": "Sign Language (Prerecorded)", "text": "Sign language interpretation is provided for all prerecorded audio content in synchronized media.", @@ -96,6 +103,7 @@ }, "1.2.7": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-extended-ad", + "id": "wcag20:media-equiv-extended-ad", "num": "1.2.7", "handle": "Extended Audio Description (Prerecorded)", "text": "Where pauses in foreground audio are insufficient to allow audio descriptions to convey the sense of the video, extended audio description is provided for all prerecorded video content in synchronized media.", @@ -103,6 +111,7 @@ }, "1.2.8": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-text-doc", + "id": "wcag20:media-equiv-text-doc", "num": "1.2.8", "handle": "Media Alternative (Prerecorded)", "text": "An alternative for time-based media is provided for all prerecorded synchronized media and for all prerecorded video-only media.", @@ -110,6 +119,7 @@ }, "1.2.9": { "url": "https://www.w3.org/TR/WCAG20/#media-equiv-live-audio-only", + "id": "wcag20:media-equiv-live-audio-only", "num": "1.2.9", "handle": "Audio-only (Live)", "text": "An alternative for time-based media that presents equivalent information for live audio-only content is provided.", @@ -117,6 +127,7 @@ }, "1.3.1": { "url": "https://www.w3.org/TR/WCAG20/#content-structure-separation-programmatic", + "id": "wcag20:content-structure-separation-programmatic", "num": "1.3.1", "handle": "Info and Relationships", "text": "Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.", @@ -124,6 +135,7 @@ }, "1.3.2": { "url": "https://www.w3.org/TR/WCAG20/#content-structure-separation-sequence", + "id": "wcag20:content-structure-separation-sequence", "num": "1.3.2", "handle": "Meaningful Sequence", "text": "When the sequence in which content is presented affects its meaning, a correct reading sequence can be programmatically determined.", @@ -131,6 +143,7 @@ }, "1.3.3": { "url": "https://www.w3.org/TR/WCAG20/#content-structure-separation-understanding", + "id": "wcag20:content-structure-separation-understanding", "num": "1.3.3", "handle": "Sensory Characteristics", "text": "Instructions provided for understanding and operating content do not rely solely on sensory characteristics of components such as shape, size, visual location, orientation, or sound.", @@ -145,6 +158,7 @@ }, "1.4.1": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast-without-color", + "id": "wcag20:visual-audio-contrast-without-color", "num": "1.4.1", "handle": "Use of Color", "text": "Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.", @@ -159,6 +173,7 @@ }, "1.4.2": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast-dis-audio", + "id": "wcag20:visual-audio-contrast-dis-audio", "num": "1.4.2", "handle": "Audio Control", "text": "If any audio on a Web page plays automatically for more than 3 seconds, either a mechanism is available to pause or stop the audio, or a mechanism is available to control audio volume independently from the overall system volume level.", @@ -173,6 +188,7 @@ }, "1.4.3": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast", + "id": "wcag20:visual-audio-contrast-contrast", "num": "1.4.3", "handle": "Contrast (Minimum)", "text": "The visual presentation of text and images of text has a contrast ratio of at least 4.5:1, except for the following:", @@ -199,6 +215,7 @@ }, "1.4.4": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast-scale", + "id": "wcag20:visual-audio-contrast-scale", "num": "1.4.4", "handle": "Resize text", "text": "Except for captions and images of text, text can be resized without assistive technology up to 200 percent without loss of content or functionality.", @@ -206,6 +223,7 @@ }, "1.4.5": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast-text-presentation", + "id": "wcag20:visual-audio-contrast-text-presentation", "num": "1.4.5", "handle": "Images of Text", "text": "If the technologies being used can achieve the visual presentation, text is used to convey information rather than images of text except for the following:", @@ -233,6 +251,7 @@ }, "1.4.6": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast7", + "id": "wcag20:visual-audio-contrast7", "num": "1.4.6", "handle": "Contrast (Enhanced)", "text": "The visual presentation of text and images of text has a contrast ratio of at least 7:1, except for the following:", @@ -259,6 +278,7 @@ }, "1.4.7": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast-noaudio", + "id": "wcag20:visual-audio-contrast-noaudio", "num": "1.4.7", "handle": "Low or No Background Audio", "text": "For prerecorded audio-only content that (1) contains primarily speech in the foreground, (2) is not an audio CAPTCHA or audio logo, and (3) is not vocalization intended to be primarily musical expression such as singing or rapping, at least one of the following is true:", @@ -290,6 +310,7 @@ }, "1.4.8": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast-visual-presentation", + "id": "wcag20:visual-audio-contrast-visual-presentation", "num": "1.4.8", "handle": "Visual Presentation", "text": "For the visual presentation of blocks of text, a mechanism is available to achieve the following:", @@ -324,6 +345,7 @@ }, "1.4.9": { "url": "https://www.w3.org/TR/WCAG20/#visual-audio-contrast-text-images", + "id": "wcag20:visual-audio-contrast-text-images", "num": "1.4.9", "handle": "Images of Text (No Exception)", "text": "Images of text are only used for pure decoration or where a particular presentation of text is essential to the information being conveyed.", @@ -338,6 +360,7 @@ }, "2.1.1": { "url": "https://www.w3.org/TR/WCAG20/#keyboard-operation-keyboard-operable", + "id": "wcag20:keyboard-operation-keyboard-operable", "num": "2.1.1", "handle": "Keyboard", "text": "All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user's movement and not just the endpoints.", @@ -357,6 +380,7 @@ }, "2.1.2": { "url": "https://www.w3.org/TR/WCAG20/#keyboard-operation-trapping", + "id": "wcag20:keyboard-operation-trapping", "num": "2.1.2", "handle": "No Keyboard Trap", "text": "If keyboard focus can be moved to a component of the page using a keyboard interface, then focus can be moved away from that component using only a keyboard interface, and, if it requires more than unmodified arrow or tab keys or other standard exit methods, the user is advised of the method for moving focus away.", @@ -371,6 +395,7 @@ }, "2.1.3": { "url": "https://www.w3.org/TR/WCAG20/#keyboard-operation-all-funcs", + "id": "wcag20:keyboard-operation-all-funcs", "num": "2.1.3", "handle": "Keyboard (No Exception)", "text": "All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes.", @@ -378,6 +403,7 @@ }, "2.2.1": { "url": "https://www.w3.org/TR/WCAG20/#time-limits-required-behaviors", + "id": "wcag20:time-limits-required-behaviors", "num": "2.2.1", "handle": "Timing Adjustable", "text": "For each time limit that is set by the content, at least one of the following is true:", @@ -421,6 +447,7 @@ }, "2.2.2": { "url": "https://www.w3.org/TR/WCAG20/#time-limits-pause", + "id": "wcag20:time-limits-pause", "num": "2.2.2", "handle": "Pause, Stop, Hide", "text": "For moving, blinking, scrolling, or auto-updating information, all of the following are true:", @@ -463,6 +490,7 @@ }, "2.2.3": { "url": "https://www.w3.org/TR/WCAG20/#time-limits-no-exceptions", + "id": "wcag20:time-limits-no-exceptions", "num": "2.2.3", "handle": "No Timing", "text": "Timing is not an essential part of the event or activity presented by the content, except for non-interactive synchronized media and real-time events.", @@ -470,6 +498,7 @@ }, "2.2.4": { "url": "https://www.w3.org/TR/WCAG20/#time-limits-postponed", + "id": "wcag20:time-limits-postponed", "num": "2.2.4", "handle": "Interruptions", "text": "Interruptions can be postponed or suppressed by the user, except interruptions involving an emergency.", @@ -477,6 +506,7 @@ }, "2.2.5": { "url": "https://www.w3.org/TR/WCAG20/#time-limits-server-timeout", + "id": "wcag20:time-limits-server-timeout", "num": "2.2.5", "handle": "Re-authenticating", "text": "When an authenticated session expires, the user can continue the activity without loss of data after re-authenticating.", @@ -484,6 +514,7 @@ }, "2.3.1": { "url": "https://www.w3.org/TR/WCAG20/#seizure-does-not-violate", + "id": "wcag20:seizure-does-not-violate", "num": "2.3.1", "handle": "Three Flashes or Below Threshold", "text": "Web pages do not contain anything that flashes more than three times in any one second period, or the flash is below the general flash and red flash thresholds.", @@ -498,6 +529,7 @@ }, "2.3.2": { "url": "https://www.w3.org/TR/WCAG20/#seizure-three-times", + "id": "wcag20:seizure-three-times", "num": "2.3.2", "handle": "Three Flashes", "text": "Web pages do not contain anything that flashes more than three times in any one second period.", @@ -505,6 +537,7 @@ }, "2.4.1": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-skip", + "id": "wcag20:navigation-mechanisms-skip", "num": "2.4.1", "handle": "Bypass Blocks", "text": "A mechanism is available to bypass blocks of content that are repeated on multiple Web pages.", @@ -512,6 +545,7 @@ }, "2.4.2": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-title", + "id": "wcag20:navigation-mechanisms-title", "num": "2.4.2", "handle": "Page Titled", "text": "Web pages have titles that describe topic or purpose.", @@ -519,6 +553,7 @@ }, "2.4.3": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-focus-order", + "id": "wcag20:navigation-mechanisms-focus-order", "num": "2.4.3", "handle": "Focus Order", "text": "If a Web page can be navigated sequentially and the navigation sequences affect meaning or operation, focusable components receive focus in an order that preserves meaning and operability.", @@ -526,6 +561,7 @@ }, "2.4.4": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-refs", + "id": "wcag20:navigation-mechanisms-refs", "num": "2.4.4", "handle": "Link Purpose (In Context)", "text": "The purpose of each link can be determined from the link text alone or from the link text together with its programmatically determined link context, except where the purpose of the link would be ambiguous to users in general.", @@ -533,6 +569,7 @@ }, "2.4.5": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-mult-loc", + "id": "wcag20:navigation-mechanisms-mult-loc", "num": "2.4.5", "handle": "Multiple Ways", "text": "More than one way is available to locate a Web page within a set of Web pages except where the Web Page is the result of, or a step in, a process.", @@ -540,6 +577,7 @@ }, "2.4.6": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-descriptive", + "id": "wcag20:navigation-mechanisms-descriptive", "num": "2.4.6", "handle": "Headings and Labels", "text": "Headings and labels describe topic or purpose.", @@ -547,6 +585,7 @@ }, "2.4.7": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-focus-visible", + "id": "wcag20:navigation-mechanisms-focus-visible", "num": "2.4.7", "handle": "Focus Visible", "text": "Any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible.", @@ -554,6 +593,7 @@ }, "2.4.8": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-location", + "id": "wcag20:navigation-mechanisms-location", "num": "2.4.8", "handle": "Location", "text": "Information about the user's location within a set of Web pages is available.", @@ -561,6 +601,7 @@ }, "2.4.9": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-link", + "id": "wcag20:navigation-mechanisms-link", "num": "2.4.9", "handle": "Link Purpose (Link Only)", "text": "A mechanism is available to allow the purpose of each link to be identified from link text alone, except where the purpose of the link would be ambiguous to users in general.", @@ -568,6 +609,7 @@ }, "2.4.10": { "url": "https://www.w3.org/TR/WCAG20/#navigation-mechanisms-headings", + "id": "wcag20:navigation-mechanisms-headings", "num": "2.4.10", "handle": "Section Headings", "text": "Section headings are used to organize the content.", @@ -587,6 +629,7 @@ }, "3.1.1": { "url": "https://www.w3.org/TR/WCAG20/#meaning-doc-lang-id", + "id": "wcag20:meaning-doc-lang-id", "num": "3.1.1", "handle": "Language of Page", "text": "The default human language of each Web page can be programmatically determined.", @@ -594,6 +637,7 @@ }, "3.1.2": { "url": "https://www.w3.org/TR/WCAG20/#meaning-other-lang-id", + "id": "wcag20:meaning-other-lang-id", "num": "3.1.2", "handle": "Language of Parts", "text": "The human language of each passage or phrase in the content can be programmatically determined except for proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the immediately surrounding text.", @@ -601,6 +645,7 @@ }, "3.1.3": { "url": "https://www.w3.org/TR/WCAG20/#meaning-idioms", + "id": "wcag20:meaning-idioms", "num": "3.1.3", "handle": "Unusual Words", "text": "A mechanism is available for identifying specific definitions of words or phrases used in an unusual or restricted way, including idioms and jargon.", @@ -608,6 +653,7 @@ }, "3.1.4": { "url": "https://www.w3.org/TR/WCAG20/#meaning-located", + "id": "wcag20:meaning-located", "num": "3.1.4", "handle": "Abbreviations", "text": "A mechanism for identifying the expanded form or meaning of abbreviations is available.", @@ -622,6 +668,7 @@ }, "3.1.6": { "url": "https://www.w3.org/TR/WCAG20/#meaning-pronunciation", + "id": "wcag20:meaning-pronunciation", "num": "3.1.6", "handle": "Pronunciation", "text": "A mechanism is available for identifying specific pronunciation of words where meaning of the words, in context, is ambiguous without knowing the pronunciation.", @@ -629,6 +676,7 @@ }, "3.2.1": { "url": "https://www.w3.org/TR/WCAG20/#consistent-behavior-receive-focus", + "id": "wcag20:consistent-behavior-receive-focus", "num": "3.2.1", "handle": "On Focus", "text": "When any component receives focus, it does not initiate a change of context.", @@ -636,6 +684,7 @@ }, "3.2.2": { "url": "https://www.w3.org/TR/WCAG20/#consistent-behavior-unpredictable-change", + "id": "wcag20:consistent-behavior-unpredictable-change", "num": "3.2.2", "handle": "On Input", "text": "Changing the setting of any user interface component does not automatically cause a change of context unless the user has been advised of the behavior before using the component.", @@ -643,6 +692,7 @@ }, "3.2.3": { "url": "https://www.w3.org/TR/WCAG20/#consistent-behavior-consistent-locations", + "id": "wcag20:consistent-behavior-consistent-locations", "num": "3.2.3", "handle": "Consistent Navigation", "text": "Navigational mechanisms that are repeated on multiple Web pages within a set of Web pages occur in the same relative order each time they are repeated, unless a change is initiated by the user.", @@ -650,6 +700,7 @@ }, "3.2.4": { "url": "https://www.w3.org/TR/WCAG20/#consistent-behavior-consistent-functionality", + "id": "wcag20:consistent-behavior-consistent-functionality", "num": "3.2.4", "handle": "Consistent Identification", "text": "Components that have the same functionality within a set of Web pages are identified consistently.", @@ -657,6 +708,7 @@ }, "3.2.5": { "url": "https://www.w3.org/TR/WCAG20/#consistent-behavior-no-extreme-changes-context", + "id": "wcag20:consistent-behavior-no-extreme-changes-context", "num": "3.2.5", "handle": "Change on Request", "text": "Changes of context are initiated only by user request or a mechanism is available to turn off such changes.", @@ -664,6 +716,7 @@ }, "3.3.1": { "url": "https://www.w3.org/TR/WCAG20/#minimize-error-identified", + "id": "wcag20:minimize-error-identified", "num": "3.3.1", "handle": "Error Identification", "text": "If an input error is automatically detected, the item that is in error is identified and the error is described to the user in text.", @@ -671,6 +724,7 @@ }, "3.3.2": { "url": "https://www.w3.org/TR/WCAG20/#minimize-error-cues", + "id": "wcag20:minimize-error-cues", "num": "3.3.2", "handle": "Labels or Instructions", "text": "Labels or instructions are provided when content requires user input.", @@ -678,6 +732,7 @@ }, "3.3.3": { "url": "https://www.w3.org/TR/WCAG20/#minimize-error-suggestions", + "id": "wcag20:minimize-error-suggestions", "num": "3.3.3", "handle": "Error Suggestion", "text": "If an input error is automatically detected and suggestions for correction are known, then the suggestions are provided to the user, unless it would jeopardize the security or purpose of the content.", @@ -685,6 +740,7 @@ }, "3.3.4": { "url": "https://www.w3.org/TR/WCAG20/#minimize-error-reversible", + "id": "wcag20:minimize-error-reversible", "num": "3.3.4", "handle": "Error Prevention (Legal, Financial, Data)", "text": "For Web pages that cause legal commitments or financial transactions for the user to occur, that modify or delete user-controllable data in data storage systems, or that submit user test responses, at least one of the following is true:", @@ -711,6 +767,7 @@ }, "3.3.5": { "url": "https://www.w3.org/TR/WCAG20/#minimize-error-context-help", + "id": "wcag20:minimize-error-context-help", "num": "3.3.5", "handle": "Help", "text": "Context-sensitive help is available.", @@ -718,6 +775,7 @@ }, "3.3.6": { "url": "https://www.w3.org/TR/WCAG20/#minimize-error-reversible-all", + "id": "wcag20:minimize-error-reversible-all", "num": "3.3.6", "handle": "Error Prevention (All)", "text": "For Web pages that require the user to submit information, at least one of the following is true:", @@ -744,6 +802,7 @@ }, "4.1.1": { "url": "https://www.w3.org/TR/WCAG20/#ensure-compat-parses", + "id": "wcag20:ensure-compat-parses", "num": "4.1.1", "handle": "Parsing", "text": "In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features.", @@ -758,6 +817,7 @@ }, "4.1.2": { "url": "https://www.w3.org/TR/WCAG20/#ensure-compat-rsv", + "id": "wcag20:ensure-compat-rsv", "num": "4.1.2", "handle": "Name, Role, Value", "text": "For all user interface components (including but not limited to: form elements, links and components generated by scripts), the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies.", diff --git a/_draft-tests/SC1-1-1-decorative-images.html b/_draft-tests/SC1-1-1-decorative-images.html new file mode 100644 index 00000000000..a076ddcccc5 --- /dev/null +++ b/_draft-tests/SC1-1-1-decorative-images.html @@ -0,0 +1,26 @@ +--- +rule_id: SC1-1-1-decorative-images + +success_criterion: +- 1.1.1 # Non-text Content (level A) +--- + +

inapplicable

+ +

To do

+ +

step1-pass

+ +
+ +
+ +

step1-fail

+ +
+ +
diff --git a/_layouts/default.html b/_layouts/default.html index 69a9e5d7b40..ff0c8c25454 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -2,8 +2,18 @@ - - {{ page.title | escape }} - {{ site.title | escape }} +{% if page.rule_id and page.layout == 'rule' %} + {% assign page_title = page.rule_id | prepend: "Rule: " %} +{% else %} + {% if page.rule_id and page.layout == 'testcase' %} + {% assign page_title = page.rule_id | prepend: "Test Cases for " %} + {% else %} + {% assign page_title = page.title %} + {% endif %} +{% endif %} + + {{ page_title }} - {{ site.title | escape }} + @@ -94,8 +104,8 @@
- {% if page.title %} -

{{ page.title }}

+ {% if page_title %} +

{{ page_title }}

{% endif %} {{ content }} diff --git a/_layouts/draft.html b/_layouts/draft.html deleted file mode 100644 index dac3e84b163..00000000000 --- a/_layouts/draft.html +++ /dev/null @@ -1,7 +0,0 @@ ---- -layout: rule ---- - -

Please note, this is a draft

- -{{ content }} diff --git a/_layouts/rule.html b/_layouts/rule.html index 77485afb7ac..f97658eb1e6 100644 --- a/_layouts/rule.html +++ b/_layouts/rule.html @@ -1,8 +1,11 @@ --- layout: default -title: {{ page.rule_id }} --- +{% if page.draft %} +

Please note, this is a draft

+{% endif %} + {% if page.date %}

Late updated:

{% endif %} diff --git a/_layouts/testcase.html b/_layouts/testcase.html new file mode 100644 index 00000000000..9ede610d4c6 --- /dev/null +++ b/_layouts/testcase.html @@ -0,0 +1,17 @@ +--- +layout: default +--- + +

Back to rule: + {{ page.rule_id }} +

+ +

Elements that match [data-outcome="inapplicable"] should be ignored by the rule. Elements that match [data-outcome="failed"] should be returned as failed, and those matching [data-outcome="passed"] should be passed. Other elements may match other rules, these results should be ignored for the purpose of this test file.

+ +{{ content }} \ No newline at end of file diff --git a/act-testcases.json b/act-testcases.json new file mode 100644 index 00000000000..4482094e54d --- /dev/null +++ b/act-testcases.json @@ -0,0 +1,27 @@ +--- +layout: null +--- +{ + "name": "auto-wcag", + "license": "https://www.w3.org/community/about/agreements/cla/", + "a11y-selectors": { + "passedSelector": "*[data-outcome=\"passed\"]", + "failedSelector": "*[data-outcome=\"failed\"]", + "inapplicableSelector": "*[data-outcome=\"inapplicable\"]" + }, + "a11y-testcases": [{% for testcase in site.rule-tests %} + { + "url": "https://auto-wcag.github.io/auto-wcag/rule-tests/{{ + testcase.rule_id + }}.html", + "rule": "auto-wcag:{{ testcase.rule_id }}", + "successCriteria": [{% + for criterion in testcase.success_criterion + %}"{{ site.data.criteria[criterion].id }}"{% + unless forloop.last + %}, {% + endunless + %}{% endfor %}] + }{% unless forloop.last %},{% endunless %} + {% endfor %}] +} \ No newline at end of file diff --git a/draft-tests/SC1-1-1-decorative-images.md b/draft-tests/SC1-1-1-decorative-images.md deleted file mode 100644 index 0168ad98efc..00000000000 --- a/draft-tests/SC1-1-1-decorative-images.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -layout: default -title: Tests for SC1-1-1-decorative-images ---- - -When running the rule against the code snippet, an issue that matches the ID in the header is returned, with a pointer that refers to `#target` - -## selector - -### applicable - -**To do** - -### inapplicable - -**To do** - -## Result: step1-fail - -- In step 1, answer `yes`. -- Expect the following test to return the result with id `step2-fail`: - -### It fails when the user answers yes - - - -## Result: step1-pass - -- Expect the following tests to return the result with id `step2-pass`: -- In step 1, answer `no`. - -### It passes when the user answers no - - \ No newline at end of file