Skip to content

NewWindowWarning: add no-aria-label modifier and disabled flag#1675

Draft
pattonwebz with Copilot wants to merge 2 commits into
developfrom
copilot/add-newwindowwarning-helper
Draft

NewWindowWarning: add no-aria-label modifier and disabled flag#1675
pattonwebz with Copilot wants to merge 2 commits into
developfrom
copilot/add-newwindowwarning-helper

Conversation

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

The New Window Warning fix had modifier classes to suppress the icon and tooltip independently, but no way to block the aria-label update or disable all NWW behavior entirely for a given container.

New modifier classes

edac-nww-no-aria-label / anww-no-aria-label
Skips updateAriaLabel() for links within the container. Icon and tooltip still apply normally.

edac-nww-disabled / anww-disabled
Disables all NWW features (icon, aria-label, tooltip) for links within the container. Links are still marked data-nww-processed to prevent re-evaluation on subsequent runs (e.g. FacetWP refresh).

<!-- Suppress only aria-label update -->
<div class="edac-nww-no-aria-label">
  <a href="https://example.com" target="_blank">Already labelled link</a>
</div>

<!-- Disable NWW entirely -->
<div class="edac-nww-disabled">
  <a href="https://example.com" target="_blank">Unaffected link</a>
</div>

Both classes follow the existing anww-* / edac-nww-* dual-prefix convention and apply to both target="_blank" and window.open link types.

CSS

The disabled flag also hides any icons at the CSS level (consistent with the .edac-nww-no-icon pattern) as a safety net.

Copilot AI changed the title [WIP] Add a helper to block aria-label function in NewWindowWarning NewWindowWarning: add no-aria-label modifier and disabled flag Apr 28, 2026
Copilot AI requested a review from pattonwebz April 28, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NewWindowWarning needs helper to block aria-label function

2 participants