@brightspace-ui/core 3.193.0 → 3.194.0

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.
@@ -55,11 +55,12 @@ input.addEventListener('change', (e) => {
55
55
  * `inline-help`: Help text that will appear below the input. Use this only when other helpful cues are not sufficient, such as a carefully-worded label.
56
56
  <!-- docs: end hidden content -->
57
57
 
58
- ### Accessibility Properties
58
+ ## Accessibility
59
59
 
60
- To make your usage of `d2l-input-color` accessible, use the following properties when applicable:
60
+ At its core, the color input is a button, so it relies on standard button semantics and adheres to [W3C's Button Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button) to ensure a smooth experience for all assistive technologies, but there are a few interesting details to note:
61
61
 
62
- | Attribute | Description |
63
- |---|---|
64
- | `label` | **REQUIRED** when type is `custom`. [Acts as a primary label for the button](https://www.w3.org/WAI/tutorials/forms/labels/). Visible unless `label-hidden` is also used. |
65
- | `label-hidden` | Use if label should be visually hidden. |
62
+ * `label` is required if `type` is `custom`, since it acts as a primary label for the button
63
+ * However, if `type` is set to `background` or `foreground` a simple default will be used if `label` is left empty
64
+ * `label-hidden` can be used to hide the label when there is sufficient visual context for sighted users; the label will remain available to screen reader users who may lack the visual context
65
+ * `associated-value` allows you to set a hex color against which the input's color contrast will be measured, which ensures end users will get appropriate warnings if they choose inaccessible color combinations
66
+ * The color input remains focusable even when `disabled` or in `read-only` mode, so that users can access the tooltip giving the current value
@@ -91,7 +91,7 @@ class InputColor extends InputInlineHelpMixin(PropertyRequiredMixin(FocusMixin(F
91
91
  static get properties() {
92
92
  return {
93
93
  /**
94
- * Value of an associated color as a HEX which will be used for color contrast analysis
94
+ * ACCESSIBILITY: Value of an associated color as a HEX which will be used for color contrast analysis
95
95
  * @type {string}
96
96
  */
97
97
  associatedValue: { attribute: 'associated-value', type: String },
@@ -106,7 +106,7 @@ class InputColor extends InputInlineHelpMixin(PropertyRequiredMixin(FocusMixin(F
106
106
  */
107
107
  disallowNone: { attribute: 'disallow-none', type: Boolean },
108
108
  /**
109
- * REQUIRED: Label for the input, comes with a default value for background & foreground types.
109
+ * ACCESSIBILITY: REQUIRED: Label for the input, comes with a default value for background & foreground types.
110
110
  * @type {string}
111
111
  */
112
112
  label: {
@@ -5476,12 +5476,12 @@
5476
5476
  "attributes": [
5477
5477
  {
5478
5478
  "name": "label",
5479
- "description": "REQUIRED: Label for the input, comes with a default value for background & foreground types.",
5479
+ "description": "ACCESSIBILITY: REQUIRED: Label for the input, comes with a default value for background & foreground types.",
5480
5480
  "type": "string"
5481
5481
  },
5482
5482
  {
5483
5483
  "name": "associated-value",
5484
- "description": "Value of an associated color as a HEX which will be used for color contrast analysis",
5484
+ "description": "ACCESSIBILITY: Value of an associated color as a HEX which will be used for color contrast analysis",
5485
5485
  "type": "string"
5486
5486
  },
5487
5487
  {
@@ -5534,13 +5534,13 @@
5534
5534
  {
5535
5535
  "name": "label",
5536
5536
  "attribute": "label",
5537
- "description": "REQUIRED: Label for the input, comes with a default value for background & foreground types.",
5537
+ "description": "ACCESSIBILITY: REQUIRED: Label for the input, comes with a default value for background & foreground types.",
5538
5538
  "type": "string"
5539
5539
  },
5540
5540
  {
5541
5541
  "name": "associatedValue",
5542
5542
  "attribute": "associated-value",
5543
- "description": "Value of an associated color as a HEX which will be used for color contrast analysis",
5543
+ "description": "ACCESSIBILITY: Value of an associated color as a HEX which will be used for color contrast analysis",
5544
5544
  "type": "string"
5545
5545
  },
5546
5546
  {
@@ -1,5 +1,3 @@
1
- import { getFlag } from './flags.js';
2
-
3
1
  /* When updating MathJax, update mathjaxBaseUrl to use the new version
4
2
  * and verify that the font mappings included in mathjaxFontMappings
5
3
  * match what's present in the MathJax-src repo.
@@ -40,16 +38,10 @@ class HtmlBlockMathRenderer {
40
38
 
41
39
  async render(elem, options) {
42
40
  if (!options.contextValues) return elem;
43
- let context = options.contextValues.get(mathjaxContextKey);
44
-
45
- if (getFlag('shield-12649-mathjax-default-context', true)) {
46
- context = context || {
47
- renderLatex: false,
48
- outputScale: 1
49
- };
50
- } else {
51
- if (context === undefined) return elem;
52
- }
41
+ const context = options.contextValues.get(mathjaxContextKey) || {
42
+ renderLatex: false,
43
+ outputScale: 1
44
+ };
53
45
 
54
46
  if (!elem.querySelector('math') && !(context.renderLatex && /\$\$|\\\(|\\\[|\\begin{|\\ref{|\\eqref{/.test(elem.innerHTML))) return elem;
55
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.193.0",
3
+ "version": "3.194.0",
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",