diff --git a/catalog/2.5-edition-wcag-2.2-508-en.yaml b/catalog/2.5-edition-wcag-2.2-508-en.yaml index 4d42cfa..7fd457c 100644 --- a/catalog/2.5-edition-wcag-2.2-508-en.yaml +++ b/catalog/2.5-edition-wcag-2.2-508-en.yaml @@ -644,6 +644,14 @@ chapters: - electronic-docs - software - authoring-tool + - id: 2.4.13 + handle: Focus Appearance + alt_id: focus-appearance + components: + - web + - electronic-docs + - software + - authoring-tool - id: 2.5.5 handle: Target Size (Enhanced) alt_id: target-size-enhanced diff --git a/catalog/2.5-edition-wcag-2.2-508-eu-en.yaml b/catalog/2.5-edition-wcag-2.2-508-eu-en.yaml index 027001b..291e911 100644 --- a/catalog/2.5-edition-wcag-2.2-508-eu-en.yaml +++ b/catalog/2.5-edition-wcag-2.2-508-eu-en.yaml @@ -24,18 +24,20 @@ standards: label: >- EN 301 549 Accessibility requirements for ICT products and services - V3.2.1 (2021-03) - report_heading: Revised Section 508 Report - url: https://www.access-board.gov/ict/ + report_heading: EN 301 549 Report + url: >- + https://www.etsi.org/deliver/etsi_en/301500_301599/301549/03.02.01_60/en_301549v030201p.pdf chapters: - en_301_549_functional_performance - en_301_549_generic_requirements - - en_301_549_ICT_with_2way_voice - - en_301_549_ICT_with_Video + - en_301_549_ict_with_two-way_voice + - en_301_549_ict_with_video - en_301_549_hardware + - en_301_549_web - en_301_549_non-web-documents - en_301_549_software - en_301_549_documentation_and_support_services - - en_301_549_ICT_providing_relay_or_emergency_service_access + - en_301_549_ict_providing_relay_or_emergency_service_access chapters: - id: success_criteria_level_a label: "Table 1: Success Criteria, Level A" @@ -660,6 +662,14 @@ chapters: - electronic-docs - software - authoring-tool + - id: 2.4.13 + handle: Focus Appearance + alt_id: focus-appearance + components: + - web + - electronic-docs + - software + - authoring-tool - id: 2.5.5 handle: Target Size (Enhanced) alt_id: target-size-enhanced @@ -1238,15 +1248,10 @@ chapters: components: - none - id: en_301_549_functional_performance - label: "Chapter 4: Functional performance" + label: "Chapter 4: Functional Performance Statements" short_label: functional-performance order: 8 criteria: - - id: 4.1.1 - handle: Functional performance criteria - alt_id: functional-performance-criteria - components: - - none - id: 4.2.1 handle: Usage without vision alt_id: usage-without-vision @@ -1502,163 +1507,163 @@ chapters: alt_id: simultaneous-user-actions components: - none - - id: en_301_549_ICT_with_2way_voice - label: "Chapter 6: ITC with Two-Way Voice Communication" + - id: en_301_549_ict_with_two-way_voice + label: "Chapter 6: ICT with Two-Way Voice Communication" short_label: itc-two-way order: 10 criteria: - id: "6.1" - handle: 6.1 Audio bandwidth for speech + handle: Audio bandwidth for speech alt_id: audio-bandwidth-for-speech components: - none - id: "6.2" - handle: 6.2 Real-time text (RTT) functionality + handle: Real-time text (RTT) functionality alt_id: real-time-text-rtt-functionality components: - none - id: 6.2.1.1 - handle: 6.2.1.1 RTT communication + handle: RTT communication alt_id: rtt-communication components: - none - id: 6.2.1.2 - handle: 6.2.1.2 Concurrent voice and text + handle: Concurrent voice and text alt_id: concurrent-voice-and-text components: - none - id: 6.2.2.1 - handle: 6.2.2.1 Visually distinguishable display + handle: Visually distinguishable display alt_id: visually-distinguishable-display components: - none - id: 6.2.2.2 - handle: 6.2.2.2 Programmatically determinable send and receive direction + handle: Programmatically determinable send and receive direction alt_id: programmatically-determinable-send-and-receive-direction components: - none - id: 6.2.2.3 - handle: 6.2.2.3 Speaker identification + handle: Speaker identification alt_id: speaker-identification components: - none - id: 6.2.2.4 - handle: 6.2.2.4 Visual indicator of Audio with RTT + handle: Visual indicator of Audio with RTT alt_id: visual-indicator-of-audio-with-rtt components: - none - id: 6.2.3 - handle: 6.2.3 Interoperability + handle: Interoperability alt_id: interoperability components: - none - id: 6.2.4 - handle: 6.2.4 RTT responsiveness + handle: RTT responsiveness alt_id: rtt-responsiveness components: - none - id: "6.3" - handle: 6.3 Caller ID + handle: Caller ID alt_id: caller-id components: - none - id: "6.4" - handle: 6.4 Alternatives to voice-based services + handle: Alternatives to voice-based services alt_id: alternatives-to-voice-based-services components: - none - id: "6.5" - handle: 6.5 Video communication + handle: Video communication alt_id: video-communication components: - none - id: 6.5.1 - handle: 6.5.1 General (informative) + handle: General (informative) alt_id: general-informative components: - none - id: 6.5.2 - handle: 6.5.2 Resolution + handle: Resolution alt_id: resolution components: - none - id: 6.5.3 - handle: 6.5.3 Frame rate + handle: Frame rate alt_id: frame-rate components: - none - id: 6.5.4 - handle: 6.5.4 Synchronization between audio and video + handle: Synchronization between audio and video alt_id: synchronization-between-audio-and-video components: - none - id: 6.5.5 - handle: 6.5.5 Visual indicator of audio with video + handle: Visual indicator of audio with video alt_id: visual-indicator-of-audio-with-video components: - none - id: 6.5.6 - handle: 6.5.6 Speaker identification with video (sign language) communication + handle: Speaker identification with video (sign language) communication alt_id: speaker-identification-with-video-sign-language-communication components: - none - id: "6.6" - handle: 6.6 Alternatives to video-based services (advisory only) + handle: Alternatives to video-based services (advisory only) alt_id: alternatives-to-video-based-services-advisory-only components: - none - - id: en_301_549_ICT_with_Video + - id: en_301_549_ict_with_video label: "Chapter 7: ICT with Video Capabilities" short_label: itc-video order: 11 criteria: - id: "7.1" - handle: 7.1 Caption processing technology + handle: Caption processing technology alt_id: caption-processing-technology components: - none - id: 7.1.1 - handle: 7.1.1 Captioning playback + handle: Captioning playback alt_id: captioning-playback components: - none - id: 7.1.2 - handle: 7.1.2 Captioning synchronization + handle: Captioning synchronization alt_id: captioning-synchronization components: - none - id: 7.1.3 - handle: 7.1.3 Preservation of captioning + handle: Preservation of captioning alt_id: preservation-of-captioning components: - none - id: 7.1.4 - handle: 7.1.4 Captions characteristics + handle: Captions characteristics alt_id: captions-characteristics components: - none - id: 7.1.5 - handle: 7.1.5 Spoken subtitles + handle: Spoken subtitles alt_id: spoken-subtitles components: - none - id: 7.2.1 - handle: 7.2.1 Audio description playback + handle: Audio description playback alt_id: audio-description-playback components: - none - id: 7.2.2 - handle: 7.2.2 Audio description synchronization + handle: Audio description synchronization alt_id: audio-description-synchronization components: - none - id: 7.2.3 - handle: 7.2.3 Preservation of audio description + handle: Preservation of audio description alt_id: preservation-of-audio-description components: - none - id: "7.3" - handle: 7.3 User controls for captions and audio description + handle: User controls for captions and audio description alt_id: user-controls-for-captions-and-audio-description components: - none @@ -1668,167 +1673,167 @@ chapters: order: 12 criteria: - id: 8.1.1 - handle: 8.1.1 Generic requirements + handle: Generic requirements alt_id: generic-requirements components: - none - id: 8.1.2 - handle: 8.1.2 Standard connections + handle: Standard connections alt_id: standard-connections components: - none - id: 8.1.3 - handle: 8.1.3 Colour + handle: Colour alt_id: colour components: - none - id: "8.2" - handle: 8.2 Hardware products with speech output + handle: Hardware products with speech output alt_id: hardware-products-with-speech-output components: - none - id: 8.2.1.1 - handle: 8.2.1.1 Speech volume range + handle: Speech volume range alt_id: speech-volume-range components: - none - id: 8.2.1.2 - handle: 8.2.1.2 Incremental volume control + handle: Incremental volume control alt_id: incremental-volume-control components: - none - id: 8.2.2.1 - handle: 8.2.2.1 Fixed-line devices + handle: Fixed-line devices alt_id: fixed-line-devices components: - none - id: 8.2.2.2 - handle: 8.2.2.2 Wireless communication devices + handle: Wireless communication devices alt_id: wireless-communication-devices components: - none - id: "8.3" - handle: 8.3 Stationary ICT + handle: Stationary ICT alt_id: stationary-ict components: - none - id: 8.3.2.1 - handle: 8.3.2.1 Unobstructed high forward reach + handle: Unobstructed high forward reach alt_id: unobstructed-high-forward-reach components: - none - id: 8.3.2.2 - handle: 8.3.2.2 Unobstructed low forward reach + handle: Unobstructed low forward reach alt_id: unobstructed-low-forward-reach components: - none - id: 8.3.2.3.1 - handle: 8.3.2.3.1 Clear space + handle: Clear space alt_id: clear-space components: - none - id: 8.3.2.3.2 - handle: 8.3.2.3.2 Obstructed (< 510 mm) forward reach + handle: Obstructed (< 510 mm) forward reach alt_id: obstructed-510-mm-forward-reach components: - none - id: 8.3.2.3.3 - handle: 8.3.2.3.3 Obstructed (< 635 mm) forward reach + handle: Obstructed (< 635 mm) forward reach alt_id: obstructed-635-mm-forward-reach components: - none - id: 8.3.2.4 - handle: 8.3.2.4 Knee and toe clearance width + handle: Knee and toe clearance width alt_id: knee-and-toe-clearance-width components: - none - id: 8.3.2.5 - handle: 8.3.2.5 Toe clearance + handle: Toe clearance alt_id: toe-clearance components: - none - id: 8.3.2.6 - handle: 8.3.2.6 Knee clearance + handle: Knee clearance alt_id: knee-clearance components: - none - id: 8.3.3.1 - handle: 8.3.3.1 Unobstructed high side reach + handle: Unobstructed high side reach alt_id: unobstructed-high-side-reach components: - none - id: 8.3.3.2 - handle: 8.3.3.2 Unobstructed low side reach + handle: Unobstructed low side reach alt_id: unobstructed-low-side-reach components: - none - id: 8.3.3.3.1 - handle: 8.3.3.3.1 Obstructed (≤ 255 mm) side reach + handle: Obstructed (≤ 255 mm) side reach alt_id: obstructed-255-mm-side-reach components: - none - id: 8.3.3.3.2 - handle: 8.3.3.3.2 Obstructed (≤ 610 mm) side reach + handle: Obstructed (≤ 610 mm) side reach alt_id: obstructed-610-mm-side-reach components: - none - id: 8.3.4.1 - handle: 8.3.4.1 Change in level + handle: Change in level alt_id: change-in-level components: - none - id: 8.3.4.2 - handle: 8.3.4.2 Clear floor or ground space + handle: Clear floor or ground space alt_id: clear-floor-or-ground-space components: - none - id: 8.3.4.3.2 - handle: 8.3.4.3.2 Forward approach + handle: Forward approach alt_id: forward-approach components: - none - id: 8.3.4.3.3 - handle: 8.3.4.3.3 Parallel approach + handle: Parallel approach alt_id: parallel-approach components: - none - id: 8.3.5 - handle: 8.3.5 Visibility + handle: Visibility alt_id: visibility components: - none - id: 8.3.6 - handle: 8.3.6 Installation instructions + handle: Installation instructions alt_id: installation-instructions components: - none - id: "8.4" - handle: 8.4 Mechanically Operable parts + handle: Mechanically Operable parts alt_id: mechanically-operable-parts components: - none - id: 8.4.1 - handle: 8.4.1 Numeric keys + handle: Numeric keys alt_id: numeric-keys components: - none - id: 8.4.2.1 - handle: 8.4.2.1 Means of operation of mechanical parts + handle: Means of operation of mechanical parts alt_id: means-of-operation-of-mechanical-parts components: - none - id: 8.4.2.2 - handle: 8.4.2.2 Force of operation of mechanical parts + handle: Force of operation of mechanical parts alt_id: force-of-operation-of-mechanical-parts components: - none - id: 8.4.3 - handle: 8.4.3 Keys, tickets and fare cards + handle: Keys, tickets and fare cards alt_id: keys-tickets-and-fare-cards components: - none - id: "8.5" - handle: 8.5 Tactile indication of speech mode + handle: Tactile indication of speech mode alt_id: tactile-indication-of-speech-mode components: - none @@ -1837,22 +1842,22 @@ chapters: short_label: web order: 13 - id: en_301_549_non-web-documents - label: "Chapter 10: Non-web Documents" + label: "Chapter 10: Non-Web Documents" short_label: non-web-documents order: 14 criteria: - id: "10.0" - handle: 10.0 General (informative) + handle: General (informative) alt_id: general-informative components: - none - id: "10.5" - handle: 10.5 Caption positioning + handle: Caption positioning alt_id: caption-positioning components: - none - id: "10.6" - handle: 10.6 Audio description timing + handle: Audio description timing alt_id: audio-description-timing components: - none @@ -1862,42 +1867,40 @@ chapters: order: 15 criteria: - id: "11.0" - handle: 11.0 General (informative) + handle: General (informative) alt_id: general-informative components: - none - id: "11.5" - handle: 11.5 Interoperability with assistive technology + handle: Interoperability with assistive technology alt_id: interoperability-with-assistive-technology components: - none - id: 11.5.1 - handle: 11.5.1 Closed functionality + handle: Closed functionality alt_id: closed-functionality components: - none - id: 11.5.2 - handle: 11.5.2 Accessibility services + handle: Accessibility services alt_id: accessibility-services components: - none - id: 11.5.2.1 handle: >- - 11.5.2.1 Platform accessibility service support for software that - provides a user interface + Platform accessibility service support for software that provides a + user interface alt_id: >- platform-accessibility-service-support-for-software-that-provides-a-user-interface components: - none - id: 11.5.2.2 - handle: >- - 11.5.2.2 Platform accessibility service support for assistive - technologies + handle: Platform accessibility service support for assistive technologies alt_id: platform-accessibility-service-support-for-assistive-technologies components: - none - id: 11.5.2.3 - handle: 11.5.2.3 Use of accessibility services + handle: Use of accessibility services alt_id: use-of-accessibility-services components: - none @@ -1907,117 +1910,117 @@ chapters: components: - none - id: 11.5.2.5 - handle: 11.5.2.5 Object information + handle: Object information alt_id: object-information components: - none - id: 11.5.2.6 - handle: 11.5.2.6 Row, column, and headers + handle: Row, column, and headers alt_id: row-column-and-headers components: - none - id: 11.5.2.7 - handle: 11.5.2.7 Values + handle: Values alt_id: values components: - none - id: 11.5.2.8 - handle: 11.5.2.8 Label relationships + handle: Label relationships alt_id: label-relationships components: - none - id: 11.5.2.9 - handle: 11.5.2.9 Parent-child relationships + handle: Parent-child relationships alt_id: parent-child-relationships components: - none - id: 11.5.2.10 - handle: 11.5.2.10 Text + handle: Text alt_id: text components: - none - id: 11.5.2.11 - handle: 11.5.2.11 List of available actions + handle: List of available actions alt_id: list-of-available-actions components: - none - id: 11.5.2.12 - handle: 11.5.2.12 Execution of available actions + handle: Execution of available actions alt_id: execution-of-available-actions components: - none - id: 11.5.2.13 - handle: 11.5.2.13 Tracking of focus and selection attributes + handle: Tracking of focus and selection attributes alt_id: tracking-of-focus-and-selection-attributes components: - none - id: 11.5.2.14 - handle: 11.5.2.14 Modification of focus and selection attributes + handle: Modification of focus and selection attributes alt_id: modification-of-focus-and-selection-attributes components: - none - id: 11.5.2.15 - handle: 11.5.2.15 Change notification + handle: Change notification alt_id: change-notification components: - none - id: 11.5.2.16 - handle: 11.5.2.16 Modifications of states and properties + handle: Modifications of states and properties alt_id: modifications-of-states-and-properties components: - none - id: 11.5.2.17 - handle: 11.5.2.17 Modifications of values and text + handle: Modifications of values and text alt_id: modifications-of-values-and-text components: - none - id: "11.6" - handle: 11.6 Documented accessibility usage + handle: Documented accessibility usage alt_id: documented-accessibility-usage components: - none - id: 11.6.1 - handle: 11.6.1 User control of accessibility features + handle: User control of accessibility features alt_id: user-control-of-accessibility-features components: - none - id: 11.6.2 - handle: 11.6.2 No disruption of accessibility features + handle: No disruption of accessibility features alt_id: no-disruption-of-accessibility-features components: - none - id: "11.7" - handle: 11.7 User preferences + handle: User preferences alt_id: user-preferences components: - none - id: "11.8" - handle: 11.8 Authoring tools + handle: Authoring tools alt_id: authoring-tools components: - none - id: 11.8.1 - handle: 11.8.1 Content technology + handle: Content technology alt_id: content-technology components: - none - id: 11.8.2 - handle: 11.8.2 Accessible content creation + handle: Accessible content creation alt_id: accessible-content-creation components: - none - id: 11.8.3 - handle: 11.8.3 Preservation of accessibility information in transformations + handle: Preservation of accessibility information in transformations alt_id: preservation-of-accessibility-information-in-transformations components: - none - id: 11.8.4 - handle: 11.8.4 Repair assistance + handle: Repair assistance alt_id: repair-assistance components: - none - id: 11.8.5 - handle: 11.8.5 Templates + handle: Templates alt_id: templates components: - none @@ -2061,48 +2064,48 @@ chapters: alt_id: accessible-documentation components: - none - - id: en_301_549_ICT_providing_relay_or_emergency_service_access + - id: en_301_549_ict_providing_relay_or_emergency_service_access label: "Chapter 13: ICT Providing Relay or Emergency Service Access" short_label: itc-providing-relay-or-emergency-service-access order: 17 criteria: - id: "13.1" - handle: 13.1 Relay services requirements + handle: Relay services requirements alt_id: relay-services-requirements components: - none - id: 13.1.2 - handle: 13.1.2 Text relay services + handle: Text relay services alt_id: text-relay-services components: - none - id: 13.1.3 - handle: 13.1.3 Sign relay services + handle: Sign relay services alt_id: sign-relay-services components: - none - id: 13.1.4 - handle: 13.1.4 Lip-reading relay services + handle: Lip-reading relay services alt_id: lip-reading-relay-services components: - none - id: 13.1.5 - handle: 13.1.5 Captioned telephony services + handle: Captioned telephony services alt_id: captioned-telephony-services components: - none - id: 13.1.6 - handle: 13.1.6 Speech to speech relay services + handle: Speech to speech relay services alt_id: speech-to-speech-relay-services components: - none - id: "13.2" - handle: 13.2 Access to relay services + handle: Access to relay services alt_id: access-to-relay-services components: - none - id: "13.3" - handle: 13.3 Access to emergency services + handle: Access to emergency services alt_id: access-to-emergency-services components: - none diff --git a/catalog/2.5-edition-wcag-2.2-en.yaml b/catalog/2.5-edition-wcag-2.2-en.yaml index 62e328e..866607e 100644 --- a/catalog/2.5-edition-wcag-2.2-en.yaml +++ b/catalog/2.5-edition-wcag-2.2-en.yaml @@ -633,6 +633,14 @@ chapters: - electronic-docs - software - authoring-tool + - id: 2.4.13 + handle: Focus Appearance + alt_id: focus-appearance + components: + - web + - electronic-docs + - software + - authoring-tool - id: 2.5.5 handle: Target Size (Enhanced) alt_id: target-size-enhanced diff --git a/catalog/data/wcag-2.2.yaml b/catalog/data/wcag-2.2.yaml index 3ee6317..c0d92da 100644 --- a/catalog/data/wcag-2.2.yaml +++ b/catalog/data/wcag-2.2.yaml @@ -1,4 +1,4 @@ -title: WCAG 2.1 +title: WCAG 2.2 lang: en standard: - id: wcag-2.2 @@ -635,6 +635,14 @@ chapters: - electronic-docs - software - authoring-tool + - id: 2.4.13 + handle: Focus Appearance + alt_id: focus-appearance + components: + - web + - electronic-docs + - software + - authoring-tool - id: 2.5.5 handle: Target Size (Enhanced) alt_id: target-size-enhanced @@ -714,4 +722,4 @@ chapters: - web - electronic-docs - software - - authoring-tool \ No newline at end of file + - authoring-tool diff --git a/package-lock.json b/package-lock.json index 0c827ca..53e0acf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1405,9 +1405,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001472", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001472.tgz", - "integrity": "sha512-xWC/0+hHHQgj3/vrKYY0AAzeIUgr7L9wlELIcAvZdDUHlhL/kNxMdnQLOSOQfP8R51ZzPhmHdyMkI0MMpmxCfg==", + "version": "1.0.30001587", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz", + "integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==", "dev": true, "funding": [ { @@ -6511,9 +6511,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001472", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001472.tgz", - "integrity": "sha512-xWC/0+hHHQgj3/vrKYY0AAzeIUgr7L9wlELIcAvZdDUHlhL/kNxMdnQLOSOQfP8R51ZzPhmHdyMkI0MMpmxCfg==", + "version": "1.0.30001587", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz", + "integrity": "sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA==", "dev": true }, "chai": { diff --git a/package.json b/package.json index cfaafd9..7a1e558 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,8 @@ "generate-drupal-simple": "npx ts-node src/openacr.ts output -f openacr/drupal-9.yaml -c catalog/2.4-edition-wcag-2.1-508-en.yaml -o openacr/drupal-9-simple.html -t templates/openacr-simple-html-0.1.0.handlebars", "generate-508-catalog": "npx ts-node src/librarian.ts -c 508", "generate-WCAG-catalog": "npx ts-node src/librarian.ts -c WCAG", - "generate-WCAG21508-catalog": "npx ts-node src/librarian.ts -c WCAG21508", + "generate-INT-catalog": "npx ts-node src/librarian.ts -c INT", + "generate-WCAG21508-catalog": "npx ts-node src/librarian.ts -c WCAG21-508", "a11y-test": "pa11y-ci openacr/*.html output/*.html tests/examples/*.html", "generate-license-report": "license-checker-rseidelsohn --relativeLicensePath --relativeModulePath > license/licenses.txt", "generate-drupal-10-html": "npx ts-node src/openacr.ts output -f openacr/drupal-10-15.yaml -c catalog/2.4-edition-wcag-2.1-en.yaml -o openacr/drupal-10-15.html", diff --git a/src/createCatalog.ts b/src/createCatalog.ts index 64ef333..1cfbb04 100644 --- a/src/createCatalog.ts +++ b/src/createCatalog.ts @@ -31,7 +31,7 @@ function getComponents(components: any): any { function getChapters(catalogs: any): any { let chapters: string[] = []; - for(const index in catalogs) { + for (const index in catalogs) { if (!validateCatalogDataFiles(catalogs[index])) return; chapters = chapters.concat(catalogs[index].chapters); } @@ -40,7 +40,7 @@ function getChapters(catalogs: any): any { function getStandards(catalogs: any): any { let standard: string[] = []; - for(const index in catalogs) { + for (const index in catalogs) { if (!validateCatalogDataFiles(catalogs[index])) return; standard = standard.concat(catalogs[index].standard); } diff --git a/src/librarian.ts b/src/librarian.ts index f91e9e0..0b95113 100644 --- a/src/librarian.ts +++ b/src/librarian.ts @@ -79,7 +79,7 @@ if (argv.catalog) { ); combined = createCatalog( - [wcag20,section508], + [wcag20, section508], components, terms, "VPAT® 2.5 Revised Section 508 Edition", @@ -95,7 +95,7 @@ if (argv.catalog) { ); combined = createCatalog( - [wcag21,section508], + [wcag21, section508], components, terms, "VPAT® 2.5 WCAG 2.1 and Revised Section 508 Edition", @@ -111,7 +111,7 @@ if (argv.catalog) { ); combined = createCatalog( - [wcag22,section508], + [wcag22, section508], components, terms, "VPAT® 2.5 WCAG 2.2 and Revised Section 508 Edition", @@ -127,7 +127,7 @@ if (argv.catalog) { ); combined = createCatalog( - [wcag22,section508,en301549], + [wcag22, section508, en301549], components, terms, "VPAT® 2.5 International Edition", @@ -141,7 +141,6 @@ if (argv.catalog) { default: console.warn(`${catalog} is currently not supported.`); break; - } if (outputFile) { diff --git a/tests/create-catalog.test.ts b/tests/create-catalog.test.ts index 2c74b3d..b4532a0 100644 --- a/tests/create-catalog.test.ts +++ b/tests/create-catalog.test.ts @@ -146,39 +146,70 @@ describe("Create catalog", () => { it("pass valid catalogs should have valid standards", () => { result = createCatalog( - validWCAG, - validSection508, + [validWCAG, validSection508], validComponents, - validTerms + validTerms, + "VPAT", + "en" ); expect(result.standards[0].id).to.equal("wcag-2.0"); expect(result.standards[1].id).to.equal("508"); }); it("pass invalid section508 should have undefined standards and chapters", () => { - result = createCatalog(validWCAG, {}, validComponents, validTerms); + result = createCatalog( + [validWCAG, {}], + validComponents, + validTerms, + "VPAT", + "en" + ); expect(result.standards).to.be.undefined; expect(result.chapters).to.be.undefined; }); it("pass invalid WCAG should have undefined standards and chapters", () => { - result = createCatalog({}, validSection508, validComponents, validTerms); + result = createCatalog( + [{}, validSection508], + validComponents, + validTerms, + "VPAT", + "en" + ); expect(result.standards).to.be.undefined; expect(result.chapters).to.be.undefined; }); it("pass invalid components should have undefined components", () => { - result = createCatalog(validWCAG, validSection508, {}, validTerms); + result = createCatalog( + [validWCAG, validSection508], + {}, + validTerms, + "VPAT", + "en" + ); expect(result.components).to.be.undefined; }); it("pass invalid terms should have undefined terms", () => { - result = createCatalog(validWCAG, validSection508, validComponents, {}); + result = createCatalog( + [validWCAG, validSection508], + validComponents, + {}, + "VPAT", + "en" + ); expect(result.terms).to.be.undefined; }); it("pass null WCAG and invalid section508 should have undefined standards and chapters", () => { - result = createCatalog(null, {}, validComponents, validTerms); + result = createCatalog( + [null, {}], + validComponents, + validTerms, + "VPAT", + "en" + ); expect(result.standards).to.be.undefined; expect(result.chapters).to.be.undefined; }); diff --git a/tests/librarian-output-cli.test.ts b/tests/librarian-output-cli.test.ts index bf0dee4..1093580 100644 --- a/tests/librarian-output-cli.test.ts +++ b/tests/librarian-output-cli.test.ts @@ -33,7 +33,7 @@ describe("Librarian test output", () => { expect(output).to.equal( "Warning: This will rebuild the following catalog: 508.\n" + - "Successfully created catalog ./catalog/2.4-edition-wcag-2.0-508-en.yaml.\n" + "Successfully created catalog ./catalog/2.5-edition-wcag-2.0-508-en.yaml.\n" ); }); }); @@ -51,13 +51,13 @@ describe("Librarian test output", () => { expect(output).to.equal( "Warning: This will rebuild the following catalog: WCAG.\n" + - "Successfully created catalog ./catalog/2.4-edition-wcag-2.1-en.yaml.\n" + "Successfully created catalog ./catalog/2.5-edition-wcag-2.2-en.yaml.\n" ); }); }); - it("confirm WCAG21508 example output is valid", () => { - const valid = spawn(cmd, options.concat("WCAG21508")); + it("confirm WCAG21-508 example output is valid", () => { + const valid = spawn(cmd, options.concat("WCAG21-508")); const chunks = []; valid.stdout.on("data", (chunk) => { @@ -68,13 +68,49 @@ describe("Librarian test output", () => { const output = Buffer.concat(chunks).toString(); expect(output).to.equal( - "Warning: This will rebuild the following catalog: WCAG21508.\n" + - "Successfully created catalog ./catalog/2.4-edition-wcag-2.1-508-en.yaml.\n" + "Warning: This will rebuild the following catalog: WCAG21-508.\n" + + "Successfully created catalog ./catalog/2.5-edition-wcag-2.1-508-en.yaml.\n" ); }); }); - const other_catalogs = ["EU", "INT", "RANDOM"]; + it("confirm WCAG22-508 example output is valid", () => { + const valid = spawn(cmd, options.concat("WCAG22-508")); + const chunks = []; + + valid.stdout.on("data", (chunk) => { + chunks.push(chunk); + }); + + valid.stdout.on("end", () => { + const output = Buffer.concat(chunks).toString(); + + expect(output).to.equal( + "Warning: This will rebuild the following catalog: WCAG22-508.\n" + + "Successfully created catalog ./catalog/2.5-edition-wcag-2.2-508-en.yaml.\n" + ); + }); + }); + + it("confirm INT example output is valid", () => { + const valid = spawn(cmd, options.concat("INT")); + const chunks = []; + + valid.stdout.on("data", (chunk) => { + chunks.push(chunk); + }); + + valid.stdout.on("end", () => { + const output = Buffer.concat(chunks).toString(); + + expect(output).to.equal( + "Warning: This will rebuild the following catalog: INT.\n" + + "Successfully created catalog ./catalog/2.5-edition-wcag-2.2-508-eu-en.yaml.\n" + ); + }); + }); + + const other_catalogs = ["EU", "RANDOM"]; for (const other_catalog of other_catalogs) { it(`confirm ${other_catalog} example output is valid`, () => {