@lion/field
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.6.2](https://github.com/ing-bank/lion/compare/@lion/field@0.6.1...@lion/field@0.6.2) (2019-11-27) | ||
### Bug Fixes | ||
* **field:** getAriaElementsInRightDomOrder IE fix ([76492af](https://github.com/ing-bank/lion/commit/76492af889bc35b99a3aaf9d3315a9f6c896d43d)) | ||
## [0.6.1](https://github.com/ing-bank/lion/compare/@lion/field@0.6.0...@lion/field@0.6.1) (2019-11-26) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@lion/field", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Fields are the most fundamental building block of the Form System", | ||
@@ -37,6 +37,6 @@ "author": "ing-bank", | ||
"@lion/core": "^0.3.0", | ||
"@lion/validate": "^0.4.0" | ||
"@lion/validate": "^0.4.1" | ||
}, | ||
"devDependencies": { | ||
"@lion/localize": "^0.5.0", | ||
"@lion/localize": "^0.6.0", | ||
"@open-wc/demoing-storybook": "^0.2.0", | ||
@@ -46,3 +46,3 @@ "@open-wc/testing": "^2.3.4", | ||
}, | ||
"gitHead": "8db04b8bab3a0c8a01bc2d5110d4e38fe01ae1e7" | ||
"gitHead": "3abb65da3333e23316072fe151028e6d8dc6b997" | ||
} |
@@ -0,1 +1,3 @@ | ||
const isIE11 = /Trident/.test(window.navigator.userAgent); | ||
/** | ||
@@ -8,3 +10,2 @@ * @desc Let the order of adding ids to aria element by DOM order, so that the screen reader | ||
* @returns {array} sorted set of elements based on dom order | ||
* | ||
*/ | ||
@@ -15,6 +16,7 @@ export function getAriaElementsInRightDomOrder(descriptionElements, { reverse } = {}) { | ||
const pos = a.compareDocumentPosition(b); | ||
// Unfortunately, for IE, we have to switch the order (?) | ||
if (pos === Node.DOCUMENT_POSITION_PRECEDING || pos === Node.DOCUMENT_POSITION_CONTAINED_BY) { | ||
return 1; | ||
return isIE11 ? -1 : 1; | ||
} | ||
return -1; | ||
return isIE11 ? 1 : -1; | ||
}; | ||
@@ -21,0 +23,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215633
3065
Updated@lion/validate@^0.4.1