@brightspace-ui/core 3.53.0 → 3.54.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -85,6 +85,7 @@ Radial meters appear as a half circle. They have more visual weight than a line
85
85
  * `text` (String): Context information about what the meter is about. Adding one of the following between `{}` (e.g., `{x/y}`) causes replacements:
86
86
  * `%` in the string will be replaced with percentage value
87
87
  * `x/y` in the string will be replaced with fraction with the proper language support
88
+ * `text-hidden` (Boolean): Hides the text visually
88
89
  <!-- docs: end hidden content -->
89
90
 
90
91
 
@@ -74,7 +74,7 @@
74
74
  <div class="dark-background">
75
75
  <d2l-meter-radial value="0" max="10" foreground-light></d2l-meter-radial>
76
76
  <d2l-meter-radial value="5" max="13" foreground-light></d2l-meter-radial>
77
- <d2l-meter-radial value="5" max="13" percent foreground-light></d2l-meter-radial>
77
+ <d2l-meter-radial value="5" max="13" percent foreground-light text="Made some progress" text-hidden></d2l-meter-radial>
78
78
  <d2l-meter-radial value="10" max="10" foreground-light></d2l-meter-radial>
79
79
  <d2l-meter-radial value="5" max="10" text="Completed" foreground-light></d2l-meter-radial>
80
80
  <d2l-meter-radial value="19" max="26" style="width: 25%;" foreground-light></d2l-meter-radial>
@@ -32,7 +32,9 @@ class MeterRadial extends MeterMixin(RtlMixin(LitElement)) {
32
32
  const secondary = this._secondary(this.value, this.max, this.text);
33
33
  const primaryAria = this._primary(this.value, this.max, true) || '';
34
34
  const secondaryAria = this._secondary(this.value, this.max, this.text, true) || '';
35
- const secondaryTextElement = this.text ? html`<div class="d2l-body-small d2l-meter-text">${secondary}</div>` : nothing;
35
+ const secondaryTextElement = this.text && !this.textHidden
36
+ ? html`<div class="d2l-body-small d2l-meter-text">${secondary}</div>`
37
+ : nothing;
36
38
  const textClasses = {
37
39
  'd2l-meter-text-ltr': !this.percent,
38
40
  'd2l-heading-4': true,
@@ -100,3 +100,10 @@ Selecting a tab in the tab bar causes the relevant tab panel to be displayed. Ta
100
100
  ### Events
101
101
  - `d2l-tab-panel-selected`: dispatched when a tab is selected
102
102
  <!-- docs: end hidden content -->
103
+
104
+ ## Accessibility
105
+
106
+ The `tabs` components were built following [W3C best practices for Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) with Manual Activation. Important features include:
107
+ - Following recommended keyboard control patterns (with the exception of the "Optional" Home, End, and Delete key patterns)
108
+ - Using the roles of `tablist` and `tab` appropriately in order to facilitate screen reader information (e.g., "tab, 2 of 7")
109
+ - Using `aria-selected` to indicate `tab` selection state
@@ -21,7 +21,7 @@ export const TabPanelMixin = superclass => class extends superclass {
21
21
  */
22
22
  selected: { type: Boolean, reflect: true },
23
23
  /**
24
- * REQUIRED: The text used for the tab, as well as labelling the panel
24
+ * ACCESSIBILITY: REQUIRED: The text used for the tab, as well as labelling the panel
25
25
  * @type {string}
26
26
  */
27
27
  text: { type: String }
@@ -12586,7 +12586,7 @@
12586
12586
  "attributes": [
12587
12587
  {
12588
12588
  "name": "text",
12589
- "description": "REQUIRED: The text used for the tab, as well as labelling the panel",
12589
+ "description": "ACCESSIBILITY: REQUIRED: The text used for the tab, as well as labelling the panel",
12590
12590
  "type": "string"
12591
12591
  },
12592
12592
  {
@@ -12606,7 +12606,7 @@
12606
12606
  {
12607
12607
  "name": "text",
12608
12608
  "attribute": "text",
12609
- "description": "REQUIRED: The text used for the tab, as well as labelling the panel",
12609
+ "description": "ACCESSIBILITY: REQUIRED: The text used for the tab, as well as labelling the panel",
12610
12610
  "type": "string"
12611
12611
  },
12612
12612
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.53.0",
3
+ "version": "3.54.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",