@zohodesk/a11y
Advanced tools
Comparing version 1.0.0-temp-8 to 1.0.0-temp-9
@@ -289,3 +289,3 @@ import { getA11yLibraryConfig, setA11yLibraryConfig } from '../../Provider/Config'; | ||
const focusStyle = getA11yLibraryConfig('globalFocusClass') || style.focusStyle; | ||
const isFocusRingEnabled = getA11yLibraryConfig('focusRing') === 'true' && (getA11yLibraryConfig('focusRingEnabled') === 'onAllPlaces' || getA11yLibraryConfig('focusRingEnabled') === 'onMainPlaces' && (ele.closest('[data-a11y-focus-main-area=true]') || ele.getAttribute('data-a11y-focus-main-area') === true)); | ||
const isFocusRingEnabled = getA11yLibraryConfig('focusRing') && (getA11yLibraryConfig('focusRingEnabledPlaces') === 'all' || getA11yLibraryConfig('focusRingEnabledPlaces') === 'main' && (ele.closest('[data-a11y-focus-main-area=true]') || ele.getAttribute('data-a11y-focus-main-area') === true)); | ||
const isApplyStyle = ele.getAttribute(needFocusStyle) === 'true' || ele.getAttribute(needFocusStyle) !== 'false' && isFocusRingEnabled && isTabKeyEnabled(); // what if we don't need focusStyle for some ares. Ex: Dialog container | ||
@@ -292,0 +292,0 @@ if (isApplyStyle) { |
@@ -6,3 +6,3 @@ let config = { | ||
focusRing: true, | ||
focusRingEnabled: 'onMainPlaces' | ||
focusRingEnabledPlaces: 'main' | ||
}; | ||
@@ -9,0 +9,0 @@ export function getA11yLibraryConfig(key) { |
{ | ||
"name": "@zohodesk/a11y", | ||
"version": "1.0.0-temp-8", | ||
"version": "1.0.0-temp-9", | ||
"main": "es/index.js", | ||
@@ -5,0 +5,0 @@ "module": "es/index.js", |
41894