Skip to content

Commit

Permalink
Content - Feedback - Update documentation (#2262)
Browse files Browse the repository at this point in the history
* Content - Feedback - Update documentation

* Apply updates to implementation as discussed with DTO during office hours
* Improved the code sample displayed in the working example
* Fix the grunt script to not rely on a generated file when initiating any task
* Updated the generated content

* Content - Feedback - Apply suggestions from code review

Co-authored-by: Garneauma <[email protected]>

* Content - Feedback - Update ajax URL in code sample

---------

Co-authored-by: Garneauma <[email protected]>
  • Loading branch information
duboisp and Garneauma authored Sep 29, 2023
1 parent f8270b8 commit adfeb5d
Show file tree
Hide file tree
Showing 8 changed files with 166 additions and 48 deletions.
24 changes: 15 additions & 9 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,16 @@ module.exports = (grunt) ->
a11yReportByTestRequirement = {};
acrReportByConformity = {}

reportConf = grunt.file.readJSON( "_data/reporting.json" )
reportConf = grunt.file.readJSON( this.data.reporting )
dataSites = grunt.file.readJSON( this.data.sites )
dataComponents = grunt.file.readJSON( this.data.components )
dataCommons = grunt.file.readJSON( this.data.common )
dataTemplates = grunt.file.readJSON( this.data.templates )

a11yReportByComponent = processComponentReporting( grunt, "sites", this.data.sites, a11yReportByTestRequirement, acrReportByConformity, reportConf )
a11yReportByComponent = a11yReportByComponent.concat( processComponentReporting( grunt, "components", this.data.components, a11yReportByTestRequirement, acrReportByConformity, reportConf ) )
a11yReportByComponent = a11yReportByComponent.concat( processComponentReporting( grunt, "common", this.data.common, a11yReportByTestRequirement, acrReportByConformity, reportConf ) )
a11yReportByComponent = a11yReportByComponent.concat( processComponentReporting( grunt, "templates", this.data.templates, a11yReportByTestRequirement, acrReportByConformity, reportConf ) )
a11yReportByComponent = processComponentReporting( grunt, "sites", dataSites, a11yReportByTestRequirement, acrReportByConformity, reportConf )
a11yReportByComponent = a11yReportByComponent.concat( processComponentReporting( grunt, "components", dataComponents, a11yReportByTestRequirement, acrReportByConformity, reportConf ) )
a11yReportByComponent = a11yReportByComponent.concat( processComponentReporting( grunt, "common", dataCommons, a11yReportByTestRequirement, acrReportByConformity, reportConf ) )
a11yReportByComponent = a11yReportByComponent.concat( processComponentReporting( grunt, "templates", dataTemplates, a11yReportByTestRequirement, acrReportByConformity, reportConf ) )


#
Expand Down Expand Up @@ -523,10 +527,12 @@ module.exports = (grunt) ->

"a11y-report":
all:
sites: @file.readJSON "_data/sites.json"
components: @file.readJSON "_data/components.json"
templates: @file.readJSON "_data/templates.json"
common: @file.readJSON "_data/common.json"
# Read those genrated json file only at runtime of the task
sites: "_data/sites.json"
components: "_data/components.json"
templates: "_data/templates.json"
common: "_data/common.json"
reporting: "_data/reporting.json"

clean:
dist: [ "dist"]
Expand Down
2 changes: 1 addition & 1 deletion _data/a11yComponents.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"Archived - template","a11y":[],"acr":[]},{"name":"Authentication","a11y":[],"acr":[]},{"name":"Breadcrumb trail","a11y":[],"acr":[]},{"name":"Feedback area","a11y":[],"acr":[]},{"name":"Footer","a11y":[{"allStates":["earl:passed","earl:inapplicable"],"date":"2022-12-02","isPartial":false,"testRequirementNotCovered":[],"state":"Pass","link":"sites/footers/reports/a11y-1.json"}],"acr":[]},{"name":"GCWeb Menu","a11y":[],"acr":[]},{"name":"Header","a11y":[],"acr":[]},{"name":"Helpers","a11y":[],"acr":[]},{"name":"Language toggle link","a11y":[],"acr":[]},{"name":"Page details","a11y":[],"acr":[]},{"name":"Secondary/Local menu","a11y":[],"acr":[]},{"name":"Skip links","a11y":[],"acr":[]},{"name":"Checkboxes and radio buttons","a11y":[],"acr":[]},{"name":"Download link","a11y":[],"acr":[]},{"name":"Featured link - Documentation and working example","a11y":[],"acr":[]},{"name":"Context-specific features","a11y":[{"allStates":["earl:untested","earl:inapplicable"],"date":"2023-06-30","isPartial":false,"testRequirementNotCovered":[],"state":"Mixed","link":"components/gc-features/reports/pre-a11y-1.json"},{"allStates":["earl:passed","earl:inapplicable"],"date":"2023-08-23","isPartial":false,"testRequirementNotCovered":[],"state":"Pass","link":"components/gc-features/reports/pre-a11y-2.json"}],"acr":[]},{"name":"Feeds plugin GC override","a11y":[],"acr":[]},{"name":"Most requested - Documentation and working example","a11y":[],"acr":[]},{"name":"Services and information","a11y":[],"acr":[]},{"name":"Step by Step navigation","a11y":[],"acr":[]},{"name":"Subway map menu","a11y":[],"acr":[]},{"name":"GC tables","a11y":[],"acr":[]},{"name":"Table of Contents","a11y":[],"acr":[]},{"name":"Well header responsive","a11y":[],"acr":[]},{"name":"Other components","a11y":[],"acr":[]},{"name":"Labels","a11y":[],"acr":[]},{"name":"List - Additional style","a11y":[],"acr":[]},{"name":"Chat wizard","a11y":[],"acr":[]},{"name":"Data JSON","a11y":[],"acr":[]},{"name":"Do action","a11y":[],"acr":[]},{"name":"Fieldflow","a11y":[],"acr":[]},{"name":"JSON Manager","a11y":[],"acr":[]},{"name":"Datalist dynamic suggestion","a11y":[],"acr":[]},{"name":"URL Mapping","a11y":[],"acr":[]},{"name":"wb5-click postback converter","a11y":[],"acr":[]},{"name":"Well bold","a11y":[],"acr":[]},{"name":"Ajax Fetch","a11y":[],"acr":[]},{"name":"Alert","a11y":[],"acr":[]},{"name":"Alignment","a11y":[],"acr":[]},{"name":"Buttons","a11y":[],"acr":[]},{"name":"Color (Foreground/Background)","a11y":[],"acr":[]},{"name":"List","a11y":[],"acr":[]},{"name":"Scaffolding","a11y":[],"acr":[]},{"name":"Share widget","a11y":[{"allStates":["earl:passed","earl:inapplicable","earl:untested"],"date":"2023-07-06","isPartial":false,"testRequirementNotCovered":[],"state":"Mixed","link":"common/share/reports/pre-ally-1.json"}],"acr":[]},{"name":"Tables","a11y":[],"acr":[]},{"name":"Basic HTML","a11y":[],"acr":[]},{"name":"Advanced Service - Probably deprecated","a11y":[],"acr":[]},{"name":"Campaign name","a11y":[],"acr":[]},{"name":"Content page","a11y":[],"acr":[]},{"name":"Home","a11y":[],"acr":[]},{"name":"Other template","a11y":[],"acr":[]},{"name":"Index","a11y":[],"acr":[]},{"name":"Institutional profile","a11y":[],"acr":[]},{"name":"Laws and regulations pages","a11y":[],"acr":[]},{"name":"Lowest topic (with secondary navigation)","a11y":[],"acr":[]},{"name":"Ministerial profile","a11y":[],"acr":[]},{"name":"News","a11y":[],"acr":[]},{"name":"Organizational profile","a11y":[],"acr":[]},{"name":"Search results","a11y":[],"acr":[]},{"name":"Server error message","a11y":[],"acr":[]},{"name":"Splash page - Canada.ca","a11y":[],"acr":[]},{"name":"Thematic","a11y":[],"acr":[]},{"name":"Beta - Theme, Topic","a11y":[],"acr":[]},{"name":"Topic","a11y":[],"acr":[]}]
[{"name":"Archived - template","a11y":[],"acr":[]},{"name":"Authentication","a11y":[],"acr":[]},{"name":"Breadcrumb trail","a11y":[],"acr":[]},{"name":"Feedback area","a11y":[],"acr":[]},{"name":"Footer","a11y":[{"allStates":["earl:passed","earl:inapplicable"],"date":"2022-12-02","isPartial":false,"testRequirementNotCovered":[],"state":"Pass","link":"sites/footers/reports/a11y-1.json"}],"acr":[]},{"name":"GCWeb Menu","a11y":[],"acr":[]},{"name":"Header","a11y":[],"acr":[]},{"name":"Helpers","a11y":[],"acr":[]},{"name":"Language toggle link","a11y":[],"acr":[]},{"name":"Page details","a11y":[],"acr":[]},{"name":"Secondary/Local menu","a11y":[],"acr":[]},{"name":"Skip links","a11y":[],"acr":[]},{"name":"Checkboxes and radio buttons","a11y":[],"acr":[]},{"name":"Download link","a11y":[],"acr":[]},{"name":"Featured link - Documentation and working example","a11y":[],"acr":[]},{"name":"Context-specific features","a11y":[{"allStates":["earl:untested","earl:inapplicable"],"date":"2023-06-30","isPartial":false,"testRequirementNotCovered":[],"state":"Mixed","link":"components/gc-features/reports/pre-a11y-1.json"},{"allStates":["earl:passed","earl:inapplicable"],"date":"2023-08-23","isPartial":false,"testRequirementNotCovered":[],"state":"Pass","link":"components/gc-features/reports/pre-a11y-2.json"}],"acr":[]},{"name":"Feeds plugin GC override","a11y":[],"acr":[]},{"name":"Most requested - Documentation and working example","a11y":[],"acr":[]},{"name":"Services and information","a11y":[],"acr":[]},{"name":"Step by Step navigation","a11y":[],"acr":[]},{"name":"Break up long and complex content into pages that each focus on a step or specific answer people need before moving to the next step or section.","a11y":[],"acr":[]},{"name":"GC tables","a11y":[],"acr":[]},{"name":"Table of Contents","a11y":[],"acr":[]},{"name":"Support use case for promotional page header or panel section header the width of the well header is readjusted based on the view port.","a11y":[],"acr":[]},{"name":"Other components","a11y":[],"acr":[]},{"name":"Labels","a11y":[],"acr":[]},{"name":"List - Additional style","a11y":[],"acr":[]},{"name":"Chat wizard","a11y":[],"acr":[]},{"name":"Data JSON","a11y":[],"acr":[]},{"name":"Do action","a11y":[],"acr":[]},{"name":"Fieldflow","a11y":[],"acr":[]},{"name":"JSON Manager","a11y":[],"acr":[]},{"name":"Datalist dynamic suggestion","a11y":[],"acr":[]},{"name":"URL Mapping","a11y":[],"acr":[]},{"name":"wb5-click postback converter","a11y":[],"acr":[]},{"name":"Well bold","a11y":[],"acr":[]},{"name":"Ajax Fetch","a11y":[],"acr":[]},{"name":"Alert","a11y":[],"acr":[]},{"name":"Alignment","a11y":[],"acr":[]},{"name":"Buttons","a11y":[],"acr":[]},{"name":"Color (Foreground/Background)","a11y":[],"acr":[]},{"name":"List","a11y":[],"acr":[]},{"name":"Scaffolding","a11y":[],"acr":[]},{"name":"Share widget","a11y":[{"allStates":["earl:passed","earl:inapplicable","earl:untested"],"date":"2023-07-06","isPartial":false,"testRequirementNotCovered":[],"state":"Mixed","link":"common/share/reports/pre-ally-1.json"}],"acr":[]},{"name":"Tables","a11y":[],"acr":[]},{"name":"Basic HTML","a11y":[],"acr":[]},{"name":"Advanced Service - Probably deprecated","a11y":[],"acr":[]},{"name":"Campaign name","a11y":[],"acr":[]},{"name":"Content page","a11y":[],"acr":[]},{"name":"Home","a11y":[],"acr":[]},{"name":"Other template","a11y":[],"acr":[]},{"name":"Index","a11y":[],"acr":[]},{"name":"Institutional profile","a11y":[],"acr":[]},{"name":"Laws and regulations pages","a11y":[],"acr":[]},{"name":"Lowest topic (with secondary navigation)","a11y":[],"acr":[]},{"name":"Ministerial profile","a11y":[],"acr":[]},{"name":"News","a11y":[],"acr":[]},{"name":"Organizational profile","a11y":[],"acr":[]},{"name":"Search results","a11y":[],"acr":[]},{"name":"Server error message","a11y":[],"acr":[]},{"name":"Splash page - Canada.ca","a11y":[],"acr":[]},{"name":"Thematic","a11y":[],"acr":[]},{"name":"Beta - Theme, Topic","a11y":[],"acr":[]},{"name":"Topic","a11y":[],"acr":[]}]
Loading

0 comments on commit adfeb5d

Please sign in to comment.