Reports Overview¶
The 📄 Create reports.. menu item opens a sidebar where the auditor selects which deliverables to generate. The add-on then reads the audit data, runs pre-flight quality checks, and produces the selected reports in the audit's Drive reports folder.
Report types¶
| Report | Generator | Output |
|---|---|---|
| Slides reports | doGenerateSlides_ |
Google Slides decks and/or standalone HTML presentations (Executive, WCAG, Scenario) |
| ACR / VPAT | doGenerateACR_ |
Markdown plus optional HTML in four editions (WCAG, Section 508, EN 301 549, International) |
| EE Report | doGenerateEEReport_ |
The long-form Equal Entry narrative report (Markdown plus optional HTML) |
| All Issues doc | doGenerateDocs_ |
A Google Doc dumping every issue with metadata and screenshots |
| Third-party bug report | separate workflow | Vendor-facing bug report Google Docs |
Generation flow¶
- User clicks 📄 Create reports.. →
runMenuCreateReports(Reports.js) opens the create-reports sidebar. - The sidebar calls
runGenerateReportTypes(reportTypes, reportOption, executionId), which validates the chosen WCAG version, reads issues, scenarios, configuration, report notes, and Drive folders, and runsgetErrorsForReportsPreflightChecks. If the audit is not clean it returns{error: true, preflight_errors: [...]}. generateReports_dispatches to the individual generators for each selected type.- All text-based generators share
Reports_helper_functions.jsfor markdown-to-HTML conversion, Drive file replacement, and template-tag substitution. ACR conformance values also draw on the lookup table inReport_na_or_support.js. createReportsLogAdd_appends a usage/telemetry row (run duration, issue and scenario counts, media sizes, which formats were produced) to a central log spreadsheet. Failures here do not affect the user's results.- The user can preview generated HTML output in a modal via
openPreviewWindowForHTMLFile(fileId).
Functions in Reports.js¶
| Function | Description | Facing |
|---|---|---|
runMenuCreateReports() |
Menu handler. Loads a light slice of spreadsheet data plus common and computed data, then opens the create_reports sidebar screen. |
User-facing (menu) |
runGenerateReportTypes(reportTypes, reportOption, executionId) |
Sidebar endpoint that generates the reports (see flow above). Updates the sidebar progress item to 100% and logs the run. | User-facing (sidebar) |
generateReports_(...) |
Dispatcher: calls doGenerateSlides_, doGenerateDocs_, doGenerateEEReport_, and/or doGenerateACR_ and returns a result object keyed by report type. |
Internal |
createReportsLogAdd_(...) |
Post-run telemetry writer (see flow above). | Internal |
Module constants: fileTypes, fileExtensions (md, html, gslides, gdocs), auditScopeEnum.
Shared report plumbing (Reports_helper_functions.js)¶
| Function | Description | Facing |
|---|---|---|
openPreviewWindowForHTMLFile(fileId) |
Reads a generated HTML report from Drive and shows it in a large modal so the user can preview without leaving the spreadsheet. | User-facing (sidebar) |
convertMDToHTML_(mdText) / getMDToHTMLConverter_() |
Markdown-to-HTML conversion via the showdown library (tables, autolinks, links in new window, literal mid-word underscores). | Internal |
trimParagraphTag_(html) |
Strips a wrapping <p> pair (showdown bug workaround). |
Internal |
getEEStyledHTML_(title, htmlMain) |
Wraps content in the EE HTML template to produce a styled standalone HTML deliverable. | Internal |
replaceReportPlainText_(...) |
Deletes the previous report file carrying the matching issue_list_report_type Drive property, then inserts the new .md/.html file with that property set. |
Internal |
replaceReportPresentation_(...) |
Same replace-by-property flow for Google Slides decks: removes the old deck and copies the template presentation under the new name. | Internal |
deleteDriveFileFromFolderByProperty_(folder, key, value) |
Trashes every file in a folder carrying the matching public custom property. | Internal |
deleteDriveFileAdv_(file) |
Trashes a file; if the user is not the owner and trashing is refused, re-parents it into a dedicated "could not be trashed" folder. | Internal |
getDetailedScenarioStepsMD_(computed) |
Renders the non-ad-hoc scenarios as markdown headings, overviews, and numbered steps. | Internal |
getReplacementsForReportNotesKeys_ / getReplacementsForConfigKeys_ |
Map Report Notes fields and Configuration keys onto {{TAG}} values (with EE date formatting, bullet lists for multi-value keys, and markdown links for values with URLs). |
Internal |
replaceTemplateTags_(templateText, replacementsData) |
Performs all {{TAG}} → value substitutions. |
Internal |
getImageSrcByGDriveUrl_(driveFileURL) |
Converts a Drive file URL into a directly embeddable image source. | Internal |
isACRIncluded(selectedTypes) |
Whether the user's selection includes any ACR/VPAT edition. | Internal |
Constants: issueListMetaDataKeys and issueListMetaDataValuesReports - the Drive property values identifying each generated report file.