Skip to content

Commit

Permalink
Merge branch 'master' into dev-1008
Browse files Browse the repository at this point in the history
  • Loading branch information
ErickRenteria committed Jan 18, 2024
2 parents 461fe46 + 6434d65 commit 0a8c570
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h3 id="ruleMessage"></h3>
### About this requirement

* [IBM 2.4.2 Page Titled](https://www.ibm.com/able/requirements/requirements/#2_4_2)
* [G88: Descriptive titles for Web pages](https://www.w3.org/WAI/WCAG22/Techniques/general/G88)
* [G88: Descriptive titles](https://www.w3.org/WAI/WCAG22/Techniques/general/G88)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h3 id="ruleMessage"></h3>

* [IBM 2.4.2 Page Titled](https://www.ibm.com/able/requirements/requirements/#2_4_2)
* [Design - Page titles](https://www.ibm.com/able/toolkit/design/content/#page-titles)
* [G88: Descriptive titles for Web pages](https://www.w3.org/WAI/WCAG22/Techniques/general/G88)
* [G88: Descriptive titles](https://www.w3.org/WAI/WCAG22/Techniques/general/G88)

### Who does this affect?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ export class ReportSection extends React.Component<ReportSectionProps, ReportSec
appController.addLevelFilterListener(() => {
this.setState({});
})
let url = (await bgController.getTabInfo(getTabId())).url!;
let alreadyIgnored = await bgController.getIgnore(url);
this.setState({ ignoredIssues: alreadyIgnored });
}

componentWillUnmount(): void {
Expand All @@ -126,7 +123,10 @@ export class ReportSection extends React.Component<ReportSectionProps, ReportSec
if (report) {
report!.results = report!.results.filter(issue => issue.value[1] !== "PASS" || issue.ruleId === "detector_tabbable");
}
let url = (await bgController.getTabInfo(getTabId())).url!;
let alreadyIgnored = await bgController.getIgnore(url);
this.setState({
ignoredIssues: alreadyIgnored,
report,
canScan: (await bgController.getTabInfo(getTabId()!)).canScan
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export class ReportTreeGrid<RowType extends IRowGroup> extends React.Component<R
}
if (!found) {
// Reset the issue selection since we can't find that same issue
this.props.onFilterToolbar(newCheckedIssues.length === 0);
this.setState({ checkedIssues: newCheckedIssues, expandedGroups: this.props.rowData?.map(group => group.id), tabRowId: this.props.rowData && this.props.rowData.length > 0 ? this.props.rowData[0].id : "tableGridHeader" });
} else {
// If we didn't change the checked issues, scroll
Expand Down Expand Up @@ -836,6 +837,7 @@ export class ReportTreeGrid<RowType extends IRowGroup> extends React.Component<R
// tabIndex={focused ? 0 : -1}
onClick={() => {
this.onRow(group, thisIssue);
ReportTreeGrid.devtoolsAppController.setSecondaryView("help");
ReportTreeGrid.devtoolsAppController.openSecondary(`#${rowId} a`);
}}
// onKeyDown={(evt: React.KeyboardEvent) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ export class ScanSection extends React.Component<{}, ScanSectionState> {
hasReportContent = true;
}
// If a scan never started, we can't be done
let url = (await bgController.getTabInfo(getTabId())).url!;
let alreadyIgnored = await bgController.getIgnore(url);
self.setState( {
ignoredIssues: alreadyIgnored,
scanningState: this.state.scanningState !== "idle"? "done" : "idle",
reportContent: hasReportContent,
report: newReport
Expand Down Expand Up @@ -190,9 +193,6 @@ export class ScanSection extends React.Component<{}, ScanSectionState> {
this.setState({ ignoredIssues: issues });
}
})
let url = (await bgController.getTabInfo(getTabId())).url!;
let alreadyIgnored = await bgController.getIgnore(url);
this.setState({ ignoredIssues: alreadyIgnored });
this.reportListener((await devtoolsController.getReport())!);
this.setState({
viewState: (await devtoolsController.getViewState())!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export default class SplashScreen extends React.Component<ISplashScreenProps, IS
This extension helps you identify accessibility issues and understand how to fix them. Use the <span style={{ fontWeight: 600 }}>'Accessibility Checker' tab in
the {BrowserDetection.isChrome()?"Elements":"Inspector" } panel</span> to locate your issues in the code and on the page.<br /><br />
These automated tests don't catch all issues. Complete your accessibility assessment with
a <a className="link" href="https://ibm.com/able/toolkit/develop/considerations/unit-testing" target="_blank">quick unit test for accessibility</a><span> </span>
or follow the <a className="link" href="https://ibm.com/able/toolkit/verify" target="_blank">full accessibility test process</a>.<br /><br />
a <a className="link" href="https://www.ibm.com/able/toolkit/develop/overview/#unit-testing" target="_blank">quick unit test for accessibility</a><span> </span>
or follow the <a className="link" href="https://www.ibm.com/able/toolkit/verify/overview"target="_blank">full accessibility test process</a>.<br /><br />
Learn how to design, build and test for accessibility with the <a className="link" href="https://ibm.com/able/toolkit" target="_blank">IBM Equal Access Toolkit</a>.
</div>
</Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
async componentDidMount(): Promise<void> {
let self = this;
this.devtoolsController.addReportListener(async (newState) => {
let url = (await bgController.getTabInfo(getTabId())).url!;
let alreadyIgnored = await bgController.getIgnore(url);
self.setState({
ignoredIssues: alreadyIgnored,
report: newState,
reportMeta: await self.devtoolsController.getReportMeta() || undefined
});
Expand All @@ -63,8 +66,8 @@
})
let url = (await bgController.getTabInfo(getTabId())).url!;
let alreadyIgnored = await bgController.getIgnore(url);
this.setState({ ignoredIssues: alreadyIgnored });
this.setState({
this.setState({
ignoredIssues: alreadyIgnored,
report: await self.devtoolsController.getReport() || undefined,
reportMeta: await self.devtoolsController.getReportMeta() || undefined
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*****************************************************************************/

import { eFilterLevel } from "../interfaces/interfaces";
import { IReport, eFilterLevel } from "../interfaces/interfaces";
import { getDevtoolsController } from "./devtoolsController";

export type eSecondaryView = "splash" | "summary" | "stored" | "help" | "kcm_overview" | "checkerViewAware";
Expand Down Expand Up @@ -48,8 +48,15 @@ export class DevtoolsAppController {

constructor() {
getDevtoolsController().addSelectedIssueListener(async () => {
this.setSecondaryView("help");
if (!this.secondaryOpen) {
this.setSecondaryView("help");
}
});
getDevtoolsController().addReportListener(async (report: IReport) => {
if (!report) {
this.setSecondaryView("splash");
}
})
}

///////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ export default class MultiScanReport {
{ key1: 'Recommendations', key2: 'Opportunities to apply best practices to further improve accessibility.' },
{ key1: '% elements without violations', key2: 'Percentage of elements on the page that had no violations found.' },
{ key1: '% elements without violations or items to review', key2: 'Percentage of elements on the page that had no violations found and no items to review.' },
{ key1: 'Level 1,2,3', key2: 'Priority level defined by the IBM Equal Access Toolkit. See https://www.ibm.com/able/toolkit/plan#pace-of-completion for details.' }
{ key1: 'Level 1,2,3', key2: 'Priority level defined by the IBM Equal Access Toolkit. See https://www.ibm.com/able/toolkit/plan/overview#pace-of-completion for details.' }
];

for (let i = 5; i < 14; i++) {
Expand Down Expand Up @@ -1649,7 +1649,7 @@ export default class MultiScanReport {
{ key1: 'Scan label', key2: 'Label for the scan. Default values can be edited in the Accessibility Checker before saving this report, or programmatically assigned in automated testing.' },
{ key1: 'Issue ID', key2: 'Identifier for this issue within this page. Rescanning the same page will produce the same issue ID. ' },
{ key1: 'Issue type', key2: 'Violation, needs review, or recommendation' },
{ key1: 'Toolkit level', key2: '1, 2 or 3. Priority level defined by the IBM Equal Access Toolkit. See https://www.ibm.com/able/toolkit/plan#pace-of-completion for details' },
{ key1: 'Toolkit level', key2: '1, 2 or 3. Priority level defined by the IBM Equal Access Toolkit. See https://www.ibm.com/able/toolkit/plan/overview#pace-of-completion for details' },
{ key1: 'Checkpoint', key2: 'Web Content Accessibility Guidelines (WCAG) checkpoints this issue falls into.' },
{ key1: 'WCAG level', key2: 'A, AA or AAA. WCAG level for this issue.' },
{ key1: 'Rule', key2: 'Name of the accessibility test rule that detected this issue.' },
Expand Down
2 changes: 1 addition & 1 deletion common/module/src/report/ACReporterCSV.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class ACReporterCSV implements IReporter {
}
}
let startScanD = new Date(startScan);
let reportFilename = `results_${startScanD.toISOString()}.csv`;
let reportFilename = `results_${startScanD.toISOString().replace(/:/g,"-")}.csv`;
if (config.outputFilenameTimestamp === false) {
reportFilename = `results.csv`;
}
Expand Down
2 changes: 1 addition & 1 deletion common/module/src/report/ACReporterJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class ACReporterJSON implements IReporter {
}
}
let startScan = new Date(storedScan.engineReport.summary.startScan);
let reportFilename = `summary_${startScan.toISOString()}.json`;
let reportFilename = `summary_${startScan.toISOString().replace(/:/g,"-")}.json`;
if (config.outputFilenameTimestamp === false) {
reportFilename = `summary.json`;
}
Expand Down
6 changes: 3 additions & 3 deletions common/module/src/report/ACReporterXLSX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class ACReporterXLSX implements IReporter {

// const buffer: any = await workbook.xlsx.writeBuffer();
let startScan = new Date(storedReport.engineReport.summary.startScan);
let reportFilename = `results_${startScan.toISOString()}.xlsx`;
let reportFilename = `results_${startScan.toISOString().replace(/:/g,"-")}.xlsx`;
if (config.outputFilenameTimestamp === false) {
reportFilename = `results.xlsx`;
}
Expand Down Expand Up @@ -933,7 +933,7 @@ export class ACReporterXLSX implements IReporter {
{ key1: 'Recommendations', key2: 'Opportunities to apply best practices to further improve accessibility.' },
{ key1: '% elements without violations', key2: 'Percentage of elements on the page that had no violations found.' },
{ key1: '% elements without violations or items to review', key2: 'Percentage of elements on the page that had no violations found and no items to review.' },
{ key1: 'Level 1,2,3', key2: 'Priority level defined by the IBM Equal Access Toolkit. See https://www.ibm.com/able/toolkit/plan#pace-of-completion for details.' }
{ key1: 'Level 1,2,3', key2: 'Priority level defined by the IBM Equal Access Toolkit. See https://www.ibm.com/able/toolkit/plan/overview#pace-of-completion for details.' }
];

for (let i = 5; i < rowData.length + 5; i++) {
Expand Down Expand Up @@ -986,7 +986,7 @@ export class ACReporterXLSX implements IReporter {
{ key1: 'Scan label', key2: 'Label for the scan. Default values can be edited in the Accessibility Checker before saving this report, or programmatically assigned in automated testing.' },
{ key1: 'Issue ID', key2: 'Identifier for this issue within this page. Rescanning the same page will produce the same issue ID. ' },
{ key1: 'Issue type', key2: 'Violation, needs review, or recommendation' },
{ key1: 'Toolkit level', key2: '1, 2 or 3. Priority level defined by the IBM Equal Access Toolkit. See https://www.ibm.com/able/toolkit/plan#pace-of-completion for details' },
{ key1: 'Toolkit level', key2: '1, 2 or 3. Priority level defined by the IBM Equal Access Toolkit. See https://www.ibm.com/able/toolkit/plan/overview#pace-of-completion for details' },
{ key1: 'Checkpoint', key2: 'Web Content Accessibility Guidelines (WCAG) checkpoints this issue falls into.' },
{ key1: 'WCAG level', key2: 'A, AA or AAA. WCAG level for this issue.' },
{ key1: 'Rule', key2: 'Name of the accessibility test rule that detected this issue.' },
Expand Down
4 changes: 2 additions & 2 deletions report-react/src/SummScoreCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export default class SummScoreCard extends React.Component<SummScoreCardProps, {
>IBM Equal Access Toolkit</a> to guide you.
</div>
<div style={{paddingTop:"36px"}}>More resources:</div>
<div><a className="link" href="https://ibm.com/able/toolkit/develop/considerations/unit-testing" target="_blank" rel="noopener noreferrer" style={{color:'#002D9C'}}>Quick unit test for accessibility</a></div>
<div><a className="link" href="https://ibm.com/able/toolkit/verify" target="_blank" rel="noopener noreferrer" style={{color:'#002D9C'}}>Full accessibility test process</a></div>
<div><a className="link" href="https://www.ibm.com/able/toolkit/develop/overview/#unit-testing" target="_blank" rel="noopener noreferrer" style={{color:'#002D9C'}}>Quick unit test for accessibility</a></div>
<div><a className="link" href="https://www.ibm.com/able/toolkit/verify/overview"target="_blank" rel="noopener noreferrer" style={{color:'#002D9C'}}>Full accessibility test process</a></div>
</Column>
</Grid>
</div>
Expand Down

0 comments on commit 0a8c570

Please sign in to comment.