@brightspace-ui/core 2.59.3 → 2.59.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.
@@ -155,7 +155,7 @@ export const FormElementMixin = superclass => class extends LocalizeCoreElement(
155
155
  return this.localize('components.form-element.defaultError', { label });
156
156
  }
157
157
 
158
- /** @ignore */
158
+ /** @ignore Note: this may be our custom FormElementValidityState or native ValidityState depending on the source. */
159
159
  get validity() {
160
160
  return this._validity;
161
161
  }
@@ -306,6 +306,15 @@ class InputNumber extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixi
306
306
  return super.validationMessage;
307
307
  }
308
308
 
309
+ /** @ignore */
310
+ get validity() {
311
+ const elem = this.shadowRoot && this.shadowRoot.querySelector('d2l-input-text');
312
+ if (elem && !elem.validity.valid) {
313
+ return elem.validity;
314
+ }
315
+ return super.validity;
316
+ }
317
+
309
318
  firstUpdated(changedProperties) {
310
319
  super.firstUpdated(changedProperties);
311
320
  this.addEventListener('d2l-localize-resources-change', () => {
@@ -331,6 +340,7 @@ class InputNumber extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixi
331
340
  ?hide-invalid-icon="${this.hideInvalidIcon}"
332
341
  id="${this._inputId}"
333
342
  input-width="${this.inputWidth}"
343
+ @invalid-change="${this._handleInvalidChange}"
334
344
  label="${ifDefined(this.label)}"
335
345
  ?label-hidden="${this.labelHidden || this.labelledBy}"
336
346
  .labelRequired="${false}"
@@ -464,6 +474,10 @@ class InputNumber extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixi
464
474
  }
465
475
  }
466
476
 
477
+ _handleInvalidChange() {
478
+ this.requestValidate(true);
479
+ }
480
+
467
481
  _handleKeyPress(e) {
468
482
  // NOTE: keypress event is deprecated, but keydown fires for ALL keys (including Shift/Tab/etc.)
469
483
  // which makes it hard to selectively supress "not numbers". The "beforeinput" event is
@@ -307,7 +307,7 @@ class InputText extends FocusMixin(LabelledMixin(FormElementMixin(SkeletonMixin(
307
307
  /** @ignore */
308
308
  get validity() {
309
309
  const elem = this.shadowRoot && this.shadowRoot.querySelector('.d2l-input');
310
- if (!elem.validity.valid) {
310
+ if (elem && !elem.validity.valid) {
311
311
  return elem.validity;
312
312
  }
313
313
  return super.validity;
@@ -18,6 +18,7 @@ Tables are used to display tabular data in rows and columns. They can allow user
18
18
  * There are more than just a few dimensions
19
19
  * The dimensions need to be sortable
20
20
  * The dimensions need to be easily compared across rows (ie- scannable)
21
+ * Specify [column and row headings](https://www.w3.org/WAI/tutorials/tables/) so data is meaningful to screen reader users
21
22
  <!-- docs: end dos -->
22
23
 
23
24
  <!-- docs: start donts -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.59.3",
3
+ "version": "2.59.4",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",