accented 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"accented.d.ts","sourceRoot":"","sources":["../src/accented.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAMnE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,eAAe,CAqFvE"}
1
+ {"version":3,"file":"accented.d.ts","sourceRoot":"","sources":["../src/accented.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAOnE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,eAAe,CAsFvE"}
package/dist/accented.js CHANGED
@@ -9,6 +9,7 @@ import { createScanner } from './scanner.js';
9
9
  import { setupScrollListeners } from './scroll-listeners.js';
10
10
  import { enabled, extendedElementsWithIssues } from './state.js';
11
11
  import { initializeContainingBlockSupportSet } from './utils/containing-blocks.js';
12
+ import { initializeCssTransformsCheck } from './utils/css-transforms.js';
12
13
  import { deepMerge } from './utils/deep-merge.js';
13
14
  import { supportsAnchorPositioning } from './utils/supports-anchor-positioning.js';
14
15
  import { validateOptions } from './validate-options.js';
@@ -73,6 +74,7 @@ export function accented(options = {}) {
73
74
  }
74
75
  enabled.value = true;
75
76
  initializeContainingBlockSupportSet();
77
+ initializeCssTransformsCheck();
76
78
  registerElements(name);
77
79
  const { disconnect: cleanupIntersectionObserver, intersectionObserver } = setupIntersectionObserver();
78
80
  const cleanupScanner = createScanner(name, context, axeOptions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AAW;IAClD,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;CACtC;AAID,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM;;uCA+EzB,eAAe,GAAG,SAAS;kDAEhB,eAAe,GAAG,SAAS;+CAE9B,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS;iDAEtB,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS;+CAE1B,gBAAgB,GAAG,SAAS;iBAE7C,OAAO,GAAG,SAAS;gBAEpB,cAAc,GAAG,SAAS;kBAExB,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS;iBAE7B,MAAM,CAAC,OAAO,CAAC,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmJvC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { effect } from '@preact/signals-core';
2
2
  import { fontSystemSans } from '../common/tokens.js';
3
3
  import { logAndRethrow } from '../log-and-rethrow.js';
4
+ import { cssTransformsAffectAnchorPositioning } from '../utils/css-transforms.js';
4
5
  import { supportsAnchorPositioning } from '../utils/supports-anchor-positioning.js';
5
6
  // We want Accented to not throw an error in Node, and use static imports,
6
7
  // so we can't export `class extends HTMLElement` because HTMLElement is not available in Node.
@@ -201,6 +202,9 @@ export const getAccentedTrigger = (name) => {
201
202
  }
202
203
  }
203
204
  #setTransform() {
205
+ if (cssTransformsAffectAnchorPositioning()) {
206
+ return;
207
+ }
204
208
  // We read and write values in separate animation frames to avoid layout thrashing.
205
209
  window.requestAnimationFrame(() => {
206
210
  if (this.element) {
@@ -1 +1 @@
1
- {"version":3,"file":"accented-trigger.js","sourceRoot":"","sources":["../../src/elements/accented-trigger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAUpF,0EAA0E;AAC1E,+FAA+F;AAC/F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAE,EAAE;IACjD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAEpD,qHAAqH;IACrH,yFAAyF;IACzF,yFAAyF;IACzF,wCAAwC;IACxC,uGAAuG;IACvG,QAAQ,CAAC,SAAS,GAAG;;;;;;UAOb,yBAAyB,EAAE;QACzB,CAAC,CAAC;;;;;SAKL;QACG,CAAC,CAAC,EACN;;;;;;;;;;;;;;;;;;uBAkBe,cAAc;;;;;;;;;;;;kCAYH,IAAI;uBACf,IAAI;;;;;;;;;;;;;;;;;;;;;;GAsBxB,CAAC;IAEF,OAAO,KAAM,SAAQ,WAAW;QAC9B,gBAAgB,CAA8B;QAE9C,2BAA2B,CAA8B;QAEzD,wBAAwB,CAA2B;QAEnD,0BAA0B,CAA2B;QAErD,wBAAwB,CAA+B;QAEvD,OAAO,CAAsB;QAE7B,MAAM,CAA6B;QAEnC,QAAQ,CAA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0B,GAAG,SAAS,CAAC;gBAC9C,CAAC;gBACD,IAAI,IAAI,CAAC,wBAAwB,EAAE,CAAC;oBAClC,IAAI,CAAC,wBAAwB,CAAC,UAAU,EAAE,CAAC;gBAC7C,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,aAAa,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;QAED,aAAa;YACX,IAAI,oCAAoC,EAAE,EAAE,CAAC;gBAC3C,OAAO;YACT,CAAC;YACD,mFAAmF;YACnF,MAAM,CAAC,qBAAqB,CAAC,GAAG,EAAE;gBAChC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;oBACjB,MAAM,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;oBACtF,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;wBACzB,MAAM,CAAC,qBAAqB,CAAC,GAAG,EAAE;4BAChC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;wBAC9D,CAAC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"intersection-observer.d.ts","sourceRoot":"","sources":["../src/intersection-observer.ts"],"names":[],"mappings":"AAKA,wBAAgB,yBAAyB;;;EAiCxC"}
1
+ {"version":3,"file":"intersection-observer.d.ts","sourceRoot":"","sources":["../src/intersection-observer.ts"],"names":[],"mappings":"AAKA,wBAAgB,yBAAyB;;;EAiDxC"}
@@ -8,11 +8,26 @@ export function setupIntersectionObserver() {
8
8
  for (const entry of entries) {
9
9
  const extendedElementWithIssues = extendedElementsWithIssues.value.find((el) => el.element === entry.target);
10
10
  if (extendedElementWithIssues) {
11
- // We initially treated setting visibility in the intersection observer
12
- // as a fallback option for browsers that don't support `position-visibility`,
13
- // but then we realized that this `position-visibility` actually works
14
- // in an unexpected way when the container has `overflow: visible`.
15
- // So now we always set visibility in the intersection observer.
11
+ /* We initially treated setting visibility in the intersection observer
12
+ as a fallback option for browsers that don't support `position-visibility`,
13
+ but then we realized that this `position-visibility` actually works
14
+ in an unexpected way when the container has `overflow: visible`.
15
+ So now we always set visibility in the intersection observer.
16
+
17
+ Update (Jan 2026): the original Chromium issue is fixed:
18
+ https://issues.chromium.org/issues/425901169
19
+
20
+ However, there's another issue that makes me hesitant to use `position-visibility`.
21
+ According to the spec (https://www.w3.org/TR/css-anchor-position-1/#position-visibility),
22
+ when the element is hidden with `position-visibility`, its `visibility` property computes
23
+ to `force-hidden`. That, however, is not implemented in any of the browsers
24
+ at the time of this writing (the computed value of `visibility` is still `visible`),
25
+ which seems to be the reason why Playwright is still reporting those elements as visible
26
+ (and it doesn't seem possible to automatically determine if they're visible or not).
27
+
28
+ Until that's properly implemented, we're probably better off relying on an intersection observer
29
+ (and having the visibility state testable).
30
+ */
16
31
  extendedElementWithIssues.visible.value = entry.isIntersecting;
17
32
  if (entry.isIntersecting && !supportsAnchorPositioning()) {
18
33
  extendedElementWithIssues.position.value = getElementPosition(entry.target);
@@ -1 +1 @@
1
- {"version":3,"file":"intersection-observer.js","sourceRoot":"","sources":["../src/intersection-observer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,MAAM,UAAU,yBAAyB;IACvC,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CACnD,CAAC,OAAO,EAAE,EAAE;QACV,IAAI,CAAC;YACH,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC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AO,EAAE,CAAC;gBAC5B,MAAM,yBAAyB,GAAG,0BAA0B,CAAC,KAAK,CAAC,IAAI,CACrE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,KAAK,KAAK,CAAC,MAAM,CACpC,CAAC;gBACF,IAAI,yBAAyB,EAAE,CAAC;oBAC9B;;;;;;;;;;;;;;;;;;;sBAmBE;oBAEF,yBAAyB,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC;oBAC/D,IAAI,KAAK,CAAC,cAAc,IAAI,CAAC,yBAAyB,EAAE,EAAE,CAAC;wBACzD,yBAAyB,CAAC,QAAQ,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;oBAC9E,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,EACD,EAAE,SAAS,EAAE,CAAC,EAAE,CACjB,CAAC;IAEF,OAAO;QACL,oBAAoB;QACpB,UAAU,EAAE,GAAG,EAAE;YACf,oBAAoB,CAAC,UAAU,EAAE,CAAC;QACpC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Some browsers (at the time of this writing, Chrome 144+) started to take CSS transforms into account
3
+ * when calculating the position of the anchored element.
4
+ *
5
+ * In light of this, this utility helps determine if we need to apply a separate transform to the anchored element
6
+ * when it's added to the DOM.
7
+ */
8
+ export declare function cssTransformsAffectAnchorPositioning(): boolean;
9
+ /**
10
+ * This function is supposed to run once at library initialization.
11
+ * It creates two elements (an anchor and an anchored element),
12
+ * with a transform applied to the anchor, and determines whether
13
+ * their positions still match.
14
+ */
15
+ export declare function initializeCssTransformsCheck(): void;
16
+ //# sourceMappingURL=css-transforms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-transforms.d.ts","sourceRoot":"","sources":["../../src/utils/css-transforms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,wBAAgB,oCAAoC,YAEnD;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,SAwB3C"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Some browsers (at the time of this writing, Chrome 144+) started to take CSS transforms into account
3
+ * when calculating the position of the anchored element.
4
+ *
5
+ * In light of this, this utility helps determine if we need to apply a separate transform to the anchored element
6
+ * when it's added to the DOM.
7
+ */
8
+ let doesAffect;
9
+ export function cssTransformsAffectAnchorPositioning() {
10
+ return doesAffect;
11
+ }
12
+ /**
13
+ * This function is supposed to run once at library initialization.
14
+ * It creates two elements (an anchor and an anchored element),
15
+ * with a transform applied to the anchor, and determines whether
16
+ * their positions still match.
17
+ */
18
+ export function initializeCssTransformsCheck() {
19
+ const anchor = document.createElement('div');
20
+ anchor.style.inlineSize = '100px';
21
+ anchor.style.blockSize = '100px';
22
+ anchor.style.transform = 'translateX(100px)';
23
+ // @ts-expect-error TS is unaware of `anchor-name`
24
+ anchor.style.anchorName = '--test-anchor';
25
+ const anchored = document.createElement('div');
26
+ anchored.style.inlineSize = '10px';
27
+ anchored.style.blockSize = '10px';
28
+ anchored.style.position = 'absolute';
29
+ // @ts-expect-error TS is unaware of `position-anchor`
30
+ anchored.style.positionAnchor = '--test-anchor';
31
+ anchored.style.insetInlineStart = 'anchor(start)';
32
+ anchored.style.insetBlockStart = 'anchor(start)';
33
+ document.body.appendChild(anchor);
34
+ document.body.appendChild(anchored);
35
+ doesAffect = anchor.getBoundingClientRect().left === anchored.getBoundingClientRect().left;
36
+ anchor.remove();
37
+ anchored.remove();
38
+ }
39
+ //# sourceMappingURL=css-transforms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-transforms.js","sourceRoot":"","sources":["../../src/utils/css-transforms.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,IAAI,UAAmB,CAAC;AAExB,MAAM,UAAU,oCAAoC;IAClD,OAAO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E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAcxD,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,WAAW,CA6BhF"}
1
+ {"version":3,"file":"get-scan-context.d.ts","sourceRoot":"","sources":["../../src/utils/get-scan-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAMxD,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,WAAW,CA6BhF"}
@@ -1,14 +1,7 @@
1
1
  import { contains } from './contains.js';
2
2
  import { deduplicateNodes } from './deduplicate-nodes.js';
3
- import { isDocumentFragment, isShadowRoot } from './dom-helpers.js';
4
3
  import { isNodeInScanContext } from './is-node-in-scan-context.js';
5
4
  import { normalizeContext } from './normalize-context.js';
6
- function replaceShadowRootsWithHosts(nodes) {
7
- // If an element is a shadow root, we can't use it in context directly,
8
- // we have to pass its host instead:
9
- // https://github.com/dequelabs/axe-core/issues/4941
10
- return nodes.map((node) => (isDocumentFragment(node) && isShadowRoot(node) ? node.host : node));
11
- }
12
5
  export function getScanContext(nodes, context) {
13
6
  const { include: contextInclude, exclude: contextExclude } = normalizeContext(context);
14
7
  // Filter only nodes that are included by context (see isNodeInContext above).
@@ -28,8 +21,8 @@ export function getScanContext(nodes, context) {
28
21
  exclude.push(...excludeDescendants);
29
22
  }
30
23
  return {
31
- include: replaceShadowRootsWithHosts(deduplicateNodes(include)),
32
- exclude: replaceShadowRootsWithHosts(deduplicateNodes(exclude)),
24
+ include: deduplicateNodes(include),
25
+ exclude: deduplicateNodes(exclude),
33
26
  };
34
27
  }
35
28
  //# sourceMappingURL=get-scan-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-scan-context.js","sourceRoot":"","sources":["../../src/utils/get-scan-context.ts"],"names":[],"mappings":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hC,mGAAmG;IACnG,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACjF,OAAO,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC;QACpC,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACjF,OAAO,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,OAAO;QACL,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC;QAClC,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC;KACnC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accented",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "A frontend library for continuous accessibility testing and issue highlighting",
5
5
  "type": "module",
6
6
  "main": "dist/accented.js",
@@ -27,12 +27,12 @@
27
27
  },
28
28
  "homepage": "https://accented.dev",
29
29
  "dependencies": {
30
- "@preact/signals-core": "^1.12.1",
31
- "axe-core": "^4.11.0"
30
+ "@preact/signals-core": "^1.12.2",
31
+ "axe-core": "^4.11.1"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/jsdom": "^27.0.0",
35
- "jsdom": "^27.1.0"
35
+ "jsdom": "^27.4.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "pnpm copyCommon && tsc",
package/src/accented.ts CHANGED
@@ -10,6 +10,7 @@ import { setupScrollListeners } from './scroll-listeners.js';
10
10
  import { enabled, extendedElementsWithIssues } from './state.js';
11
11
  import type { AccentedOptions, DisableAccented } from './types.ts';
12
12
  import { initializeContainingBlockSupportSet } from './utils/containing-blocks.js';
13
+ import { initializeCssTransformsCheck } from './utils/css-transforms.js';
13
14
  import { deepMerge } from './utils/deep-merge.js';
14
15
  import { supportsAnchorPositioning } from './utils/supports-anchor-positioning.js';
15
16
  import { validateOptions } from './validate-options.js';
@@ -92,6 +93,7 @@ export function accented(options: AccentedOptions = {}): DisableAccented {
92
93
  enabled.value = true;
93
94
 
94
95
  initializeContainingBlockSupportSet();
96
+ initializeCssTransformsCheck();
95
97
  registerElements(name);
96
98
 
97
99
  const { disconnect: cleanupIntersectionObserver, intersectionObserver } =
@@ -3,6 +3,7 @@ import { effect } from '@preact/signals-core';
3
3
  import { fontSystemSans } from '../common/tokens.js';
4
4
  import { logAndRethrow } from '../log-and-rethrow.js';
5
5
  import type { Position } from '../types.ts';
6
+ import { cssTransformsAffectAnchorPositioning } from '../utils/css-transforms.js';
6
7
  import { supportsAnchorPositioning } from '../utils/supports-anchor-positioning.js';
7
8
  import type { AccentedDialog } from './accented-dialog.ts';
8
9
 
@@ -241,6 +242,9 @@ export const getAccentedTrigger = (name: string) => {
241
242
  }
242
243
 
243
244
  #setTransform() {
245
+ if (cssTransformsAffectAnchorPositioning()) {
246
+ return;
247
+ }
244
248
  // We read and write values in separate animation frames to avoid layout thrashing.
245
249
  window.requestAnimationFrame(() => {
246
250
  if (this.element) {
@@ -12,11 +12,27 @@ export function setupIntersectionObserver() {
12
12
  (el) => el.element === entry.target,
13
13
  );
14
14
  if (extendedElementWithIssues) {
15
- // We initially treated setting visibility in the intersection observer
16
- // as a fallback option for browsers that don't support `position-visibility`,
17
- // but then we realized that this `position-visibility` actually works
18
- // in an unexpected way when the container has `overflow: visible`.
19
- // So now we always set visibility in the intersection observer.
15
+ /* We initially treated setting visibility in the intersection observer
16
+ as a fallback option for browsers that don't support `position-visibility`,
17
+ but then we realized that this `position-visibility` actually works
18
+ in an unexpected way when the container has `overflow: visible`.
19
+ So now we always set visibility in the intersection observer.
20
+
21
+ Update (Jan 2026): the original Chromium issue is fixed:
22
+ https://issues.chromium.org/issues/425901169
23
+
24
+ However, there's another issue that makes me hesitant to use `position-visibility`.
25
+ According to the spec (https://www.w3.org/TR/css-anchor-position-1/#position-visibility),
26
+ when the element is hidden with `position-visibility`, its `visibility` property computes
27
+ to `force-hidden`. That, however, is not implemented in any of the browsers
28
+ at the time of this writing (the computed value of `visibility` is still `visible`),
29
+ which seems to be the reason why Playwright is still reporting those elements as visible
30
+ (and it doesn't seem possible to automatically determine if they're visible or not).
31
+
32
+ Until that's properly implemented, we're probably better off relying on an intersection observer
33
+ (and having the visibility state testable).
34
+ */
35
+
20
36
  extendedElementWithIssues.visible.value = entry.isIntersecting;
21
37
  if (entry.isIntersecting && !supportsAnchorPositioning()) {
22
38
  extendedElementWithIssues.position.value = getElementPosition(entry.target);
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Some browsers (at the time of this writing, Chrome 144+) started to take CSS transforms into account
3
+ * when calculating the position of the anchored element.
4
+ *
5
+ * In light of this, this utility helps determine if we need to apply a separate transform to the anchored element
6
+ * when it's added to the DOM.
7
+ */
8
+
9
+ let doesAffect: boolean;
10
+
11
+ export function cssTransformsAffectAnchorPositioning() {
12
+ return doesAffect;
13
+ }
14
+
15
+ /**
16
+ * This function is supposed to run once at library initialization.
17
+ * It creates two elements (an anchor and an anchored element),
18
+ * with a transform applied to the anchor, and determines whether
19
+ * their positions still match.
20
+ */
21
+ export function initializeCssTransformsCheck() {
22
+ const anchor = document.createElement('div');
23
+ anchor.style.inlineSize = '100px';
24
+ anchor.style.blockSize = '100px';
25
+ anchor.style.transform = 'translateX(100px)';
26
+ // @ts-expect-error TS is unaware of `anchor-name`
27
+ anchor.style.anchorName = '--test-anchor';
28
+
29
+ const anchored = document.createElement('div');
30
+ anchored.style.inlineSize = '10px';
31
+ anchored.style.blockSize = '10px';
32
+ anchored.style.position = 'absolute';
33
+ // @ts-expect-error TS is unaware of `position-anchor`
34
+ anchored.style.positionAnchor = '--test-anchor';
35
+ anchored.style.insetInlineStart = 'anchor(start)';
36
+ anchored.style.insetBlockStart = 'anchor(start)';
37
+
38
+ document.body.appendChild(anchor);
39
+ document.body.appendChild(anchored);
40
+
41
+ doesAffect = anchor.getBoundingClientRect().left === anchored.getBoundingClientRect().left;
42
+
43
+ anchor.remove();
44
+ anchored.remove();
45
+ }
@@ -1,17 +1,9 @@
1
1
  import type { Context, ScanContext } from '../types.ts';
2
2
  import { contains } from './contains.js';
3
3
  import { deduplicateNodes } from './deduplicate-nodes.js';
4
- import { isDocumentFragment, isShadowRoot } from './dom-helpers.js';
5
4
  import { isNodeInScanContext } from './is-node-in-scan-context.js';
6
5
  import { normalizeContext } from './normalize-context.js';
7
6
 
8
- function replaceShadowRootsWithHosts(nodes: Array<Node>) {
9
- // If an element is a shadow root, we can't use it in context directly,
10
- // we have to pass its host instead:
11
- // https://github.com/dequelabs/axe-core/issues/4941
12
- return nodes.map((node) => (isDocumentFragment(node) && isShadowRoot(node) ? node.host : node));
13
- }
14
-
15
7
  export function getScanContext(nodes: Array<Node>, context: Context): ScanContext {
16
8
  const { include: contextInclude, exclude: contextExclude } = normalizeContext(context);
17
9
 
@@ -38,7 +30,7 @@ export function getScanContext(nodes: Array<Node>, context: Context): ScanContex
38
30
  }
39
31
 
40
32
  return {
41
- include: replaceShadowRootsWithHosts(deduplicateNodes(include)),
42
- exclude: replaceShadowRootsWithHosts(deduplicateNodes(exclude)),
33
+ include: deduplicateNodes(include),
34
+ exclude: deduplicateNodes(exclude),
43
35
  };
44
36
  }