Skip to content

Commit 4b17eac

Browse files
committed
Don't pass opener/referer info, and add info icon
1 parent 666cc67 commit 4b17eac

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

code/addons/a11y/src/components/A11yContext.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,9 @@ export const A11yContextProvider: FC<PropsWithChildren> = (props) => {
215215
const handleSelect = useCallback(
216216
(itemId: string, details: ClickEventDetails) => {
217217
const [type, id] = itemId.split('.');
218+
const result = results?.[type as RuleType]?.find((r) => r.id === id);
218219
const index =
219-
results?.[type as RuleType]
220-
?.find((r) => r.id === id)
221-
?.nodes.findIndex((n) => details.selectors.some((s) => s === String(n.target))) ?? -1;
220+
result?.nodes.findIndex((n) => details.selectors.some((s) => s === String(n.target))) ?? -1;
222221
if (index !== -1) {
223222
const key = `${type}.${id}.${index + 1}`;
224223
setSelectedItems(new Map([[`${type}.${id}`, key]]));
@@ -338,6 +337,7 @@ export const A11yContextProvider: FC<PropsWithChildren> = (props) => {
338337
},
339338
{
340339
id: `${tab}.${result.id}`,
340+
icon: 'info',
341341
title: 'View more details',
342342
clickEvent: EVENTS.SELECT,
343343
selectors,
@@ -376,6 +376,7 @@ export const A11yContextProvider: FC<PropsWithChildren> = (props) => {
376376
},
377377
{
378378
id: `${tab}.${result.id}`,
379+
icon: 'info',
379380
title: 'View more details',
380381
clickEvent: EVENTS.SELECT,
381382
selectors,

code/addons/a11y/src/components/Report/Details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const Details = ({ id, item, type, selection, handleSelectionChange }: De
143143
<RuleId>{item.id}</RuleId>
144144
<Description>
145145
{getFriendlySummaryForAxeResult(item)}{' '}
146-
<Link href={item.helpUrl} target="_blank" withArrow>
146+
<Link href={item.helpUrl} target="_blank" rel="noopener noreferrer" withArrow>
147147
Learn how to resolve this violation
148148
</Link>
149149
</Description>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy