From c98c6655a5c60315afa1fcb630934f186a13b925 Mon Sep 17 00:00:00 2001 From: "Pujan Shah (via MelvinBot)" Date: Wed, 29 Jul 2026 14:43:01 +0000 Subject: [PATCH] Underline report action links in high-contrast themes (WCAG 1.4.1) Co-authored-by: Pujan Shah --- .../HTMLEngineProvider/HTMLRenderers/AnchorRenderer.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.tsx b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.tsx index d7cfa96d248c..12aa72113d0a 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.tsx +++ b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.tsx @@ -50,6 +50,10 @@ function AnchorRenderer({tnode, style, key}: AnchorRendererProps) { const textDecorationLineStyle = isDeleted ? styles.lineThrough : {}; + // In high-contrast themes, underline report action links so they are distinguishable by more than color (WCAG 1.4.1). + // The `styles.link` used by the non-comment link path above already handles this, but AnchorForCommentsOnly does not use it. + const highContrastUnderlineStyle = theme.isHighContrast ? styles.underline : {}; + const onLinkPress = useMemo(() => { if (internalNewExpensifyPath || internalExpensifyPath) { return () => openLink(attrHref, environmentURL, isAttachment); @@ -142,6 +146,7 @@ function AnchorRenderer({tnode, style, key}: AnchorRendererProps) { style, parentStyle, styles.textDecorationLineNone, + highContrastUnderlineStyle, textDecorationLineStyle, styles.textUnderlinePositionUnder, styles.textDecorationSkipInkNone, @@ -169,6 +174,7 @@ function AnchorRenderer({tnode, style, key}: AnchorRendererProps) { props.childTnode.getNativeStyles(), parentStyle, styles.textDecorationLineNone, + highContrastUnderlineStyle, textDecorationLineStyle, styles.textUnderlinePositionUnder, styles.textDecorationSkipInkNone,