From efd309885164eb802f2b9fb4f24d78e096d951b3 Mon Sep 17 00:00:00 2001 From: Shunguo Date: Mon, 9 Oct 2023 13:52:54 -0500 Subject: [PATCH] update the rule #1676 --- .../src/v4/rules/element_tabbable_unobscured.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/accessibility-checker-engine/src/v4/rules/element_tabbable_unobscured.ts b/accessibility-checker-engine/src/v4/rules/element_tabbable_unobscured.ts index 58b16504a..b23db0f5c 100644 --- a/accessibility-checker-engine/src/v4/rules/element_tabbable_unobscured.ts +++ b/accessibility-checker-engine/src/v4/rules/element_tabbable_unobscured.ts @@ -99,10 +99,12 @@ export let element_tabbable_unobscured: Rule = { if (VisUtil.isNodeVisible(elem)) { const bnds = mapper.getBounds(elem); var zStyle = win.getComputedStyle(elem); - let z_index = "0"; - if (zStyle !== null) { + let z_index; + if (zStyle === null) + z_index = 0; + else { z_index = zStyle.zIndex; - if (!z_index || z_index === 'auto') + if (!z_index || !Number.isInteger(z_index)) z_index = "0"; } if (bnds.height !== 0 && bnds.width !== 0