Skip to content

Commit

Permalink
Merge pull request #1783 from IBMa/joho-CheckerA11yIssues-1781
Browse files Browse the repository at this point in the history
fix(extension): Fixed Issues found and Learn more modal a11y issues
  • Loading branch information
ErickRenteria authored Jan 11, 2024
2 parents 837beb9 + dd60af4 commit e7fe199
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,14 @@ export class ReportTreeGrid<RowType extends IRowGroup> extends React.Component<R
await ReportTreeGrid.devtoolsController.setSelectedIssue(issue);
if (this.props.panel === "elements" && inspect !== false) {
// this.setState({ tabRowId: ReportTreeGrid.getRowId(group, issue) });
await ReportTreeGrid.devtoolsController.inspectPath(issue.path.dom, this.treeGridRef.current);
let focusTarget: HTMLElement | null = this.treeGridRef.current;
if (ReportTreeGrid.devtoolsAppController.getSecondaryOpen()) {
let secondaryPanel = document.querySelector(".secondaryDialog") as HTMLElement;
if (window.getComputedStyle(secondaryPanel).display !== "none") {
focusTarget = secondaryPanel.querySelector(".cds--modal-close")
}
}
await ReportTreeGrid.devtoolsController.inspectPath(issue.path.dom, focusTarget);
} else {
await ReportTreeGrid.devtoolsController.setSelectedElementPath(issue.path.dom);
}
Expand Down Expand Up @@ -821,21 +828,23 @@ export class ReportTreeGrid<RowType extends IRowGroup> extends React.Component<R
tabIndex={-1}
/>
</div>
{UtilIssueReact.valueToIcon(thisIssue.value, "levelIcon")} {thisIssue.ignored && <ViewOff size={16} />}{<span style={{paddingRight:"4px"}}></span>}{thisIssue.message} <a
{UtilIssueReact.valueToIcon(thisIssue.value, "levelIcon")} {thisIssue.ignored && <ViewOff size={16} />}{<span style={{paddingRight:"4px"}}></span>}{thisIssue.message}
{" "}<Link
className="hideLg cds--link hideLg cds--link--inline cds--link--sm"
role="link"
tabIndex={focused ? 0 : -1}
href="#0"
// tabIndex={focused ? 0 : -1}
onClick={() => {
this.onRow(group, thisIssue);
ReportTreeGrid.devtoolsAppController.openSecondary(`#${rowId} a`);
}}
onKeyDown={(evt: React.KeyboardEvent) => {
if (evt.key === "Enter" || evt.key === "Return") {
this.onRow(group, thisIssue);
ReportTreeGrid.devtoolsAppController.openSecondary(`#${rowId} a`);
}
}}
>Learn more</a>
// onKeyDown={(evt: React.KeyboardEvent) => {
// if (evt.key === "Enter" || evt.key === "Return") {
// this.onRow(group, thisIssue);
// ReportTreeGrid.devtoolsAppController.openSecondary(`#${rowId} a`);
// }
// }}
>Learn more</Link>
</div>
</Column>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ export class ScanSection extends React.Component<{}, ScanSectionState> {
</span>
<Link
id="totalIssuesCount"
href="#0"
className= {totalCount === 0 ? "darkLink totalCountDisable" : "darkLink totalCountEnable"}
aria-disabled={totalCount === 0}
inline={true}
Expand Down

0 comments on commit e7fe199

Please sign in to comment.