terra-form-field
Advanced tools
Comparing version
@@ -5,2 +5,8 @@ # Changelog | ||
## 4.20.1 - (December 14, 2021) | ||
* Changed | ||
* No longer assign tabIndex -1 to the error and help divs. | ||
* Migrate docs to terra-core-docs. | ||
## 4.20.0 - (September 21, 2021) | ||
@@ -7,0 +13,0 @@ |
@@ -30,5 +30,5 @@ "use strict"; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
@@ -245,7 +245,5 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
"aria-live": "assertive", | ||
tabIndex: "-1", | ||
id: htmlFor ? "".concat(htmlFor, "-error") : undefined, | ||
className: cx('error-text') | ||
}, error), help && /*#__PURE__*/_react.default.createElement("div", { | ||
tabIndex: "-1", | ||
id: htmlFor ? "".concat(htmlFor, "-help") : undefined, | ||
@@ -252,0 +250,0 @@ className: cx('help-text') |
{ | ||
"name": "terra-form-field", | ||
"main": "lib/Field.js", | ||
"version": "4.20.0", | ||
"version": "4.20.1", | ||
"description": "The Form Field component handles the layout of the label, help text and error text associated with a form element.", | ||
@@ -48,3 +48,3 @@ "repository": { | ||
}, | ||
"gitHead": "b63b085b6be99ff184a3c43eab5d24843315942e" | ||
"gitHead": "7e2b4ffb8f4db441bf7489958f1a5a588a727272" | ||
} |
@@ -203,4 +203,4 @@ import React from 'react'; | ||
{content} | ||
{isInvalid && error && <div aria-live="assertive" tabIndex="-1" id={htmlFor ? `${htmlFor}-error` : undefined} className={cx('error-text')}>{error}</div>} | ||
{help && <div tabIndex="-1" id={htmlFor ? `${htmlFor}-help` : undefined} className={cx('help-text')}>{help}</div>} | ||
{isInvalid && error && <div aria-live="assertive" id={htmlFor ? `${htmlFor}-error` : undefined} className={cx('error-text')}>{error}</div>} | ||
{help && <div id={htmlFor ? `${htmlFor}-help` : undefined} className={cx('help-text')}>{help}</div>} | ||
</div> | ||
@@ -207,0 +207,0 @@ ); |
Terra.describeViewports('Form Field', ['medium'], () => { | ||
it('should display default Form Field', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/default-field'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/default-field'); | ||
@@ -9,3 +9,3 @@ Terra.validates.element('default'); | ||
it('should display Form Field with label', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-label'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-label'); | ||
@@ -16,3 +16,3 @@ Terra.validates.element('label'); | ||
it('should display Form Field with optional label', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-label-optional'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-label-optional'); | ||
@@ -23,3 +23,3 @@ Terra.validates.element('optional label'); | ||
it('should display Form Field with required label ', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-label-required'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-label-required'); | ||
@@ -30,3 +30,3 @@ Terra.validates.element('required label'); | ||
it('should display Form Field with error text', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-error-text'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-error-text'); | ||
@@ -37,3 +37,3 @@ Terra.validates.element('error text'); | ||
it('should display Form Field with help text', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-help-text'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-help-text'); | ||
@@ -44,3 +44,3 @@ Terra.validates.element('help text'); | ||
it('should display Form Field with label required error help text', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-label-required-error-help-text'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-label-required-error-help-text'); | ||
@@ -51,3 +51,3 @@ Terra.validates.element('label required error help text'); | ||
it('should display Form Field with hidden label', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-hidden-label'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-hidden-label'); | ||
@@ -58,3 +58,3 @@ Terra.validates.element('hidden label'); | ||
it('should display Form Field with text wrap', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-text-wrap'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-text-wrap'); | ||
@@ -65,3 +65,3 @@ Terra.validates.element('text wrap'); | ||
it('should display Form Field with long word wrap', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-long-word-wrap'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-long-word-wrap'); | ||
@@ -72,3 +72,3 @@ Terra.validates.element('long word wrap'); | ||
it('should display inline Form Field', () => { | ||
browser.url('/raw/tests/terra-form-field/form-field/field-inline'); | ||
browser.url('/raw/tests/cerner-terra-core-docs/form-field/field-inline'); | ||
@@ -75,0 +75,0 @@ Terra.validates.element('inline'); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
65903
-42.91%37
-50.67%931
-52.08%1
Infinity%