@brightspace-ui/core 3.27.8 → 3.28.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -23,17 +23,15 @@ Note: All `*-value` properties should be in ISO 8601 calendar date format (`YYYY
|
|
23
23
|
| `max-value` | String | Maximum valid date that could be selected by a user. |
|
24
24
|
| `min-value` | String | Minimum valid date that could be selected by a user. |
|
25
25
|
| `selected-value` | String | Currently selected date. |
|
26
|
-
| `summary` | String | Summary of the calendar for
|
26
|
+
| `summary` | String | ACCESSIBILITY: Summary of the calendar used by screen reader users for identifying the calendar and/or summarizing its purpose. |
|
27
27
|
|
28
28
|
### Events
|
29
29
|
|
30
30
|
* `d2l-calendar-selected`: dispatched when a date is selected through click, space, or enter. `e.detail.date` is in ISO 8601 calendar date format (`YYYY-MM-DD`).
|
31
31
|
<!-- docs: end hidden content -->
|
32
32
|
|
33
|
-
|
33
|
+
## Accessibility
|
34
34
|
|
35
|
-
|
35
|
+
The Daylight calendar (`d2l-calendar`) generally follows the W3C's best practice recommendations for a [Date picker dialog](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepicker-dialog/). Of note is the keyboard behaviour following the [grid pattern](https://www.w3.org/WAI/ARIA/apg/patterns/grid/).
|
36
36
|
|
37
|
-
|
38
|
-
|--|--|
|
39
|
-
| `summary` | Use to provide more context on the calendar usage. |
|
37
|
+
The W3C recommendations, specifically relating to `attributes` on the calendar's table elements, were followed as much as possible. At the time of development it was not possible to create a calendar with a `grid` role which had the desired appearance, functionality, and supported all browser/screen reader combinations that we support; the expected screen reader experience was replicated as much as possible (e.g., announcing the expected content).
|
@@ -159,7 +159,7 @@ class Calendar extends LocalizeCoreElement(RtlMixin(LitElement)) {
|
|
159
159
|
selectedValue: { type: String, attribute: 'selected-value' },
|
160
160
|
|
161
161
|
/**
|
162
|
-
* Summary of the calendar for
|
162
|
+
* ACCESSIBILITY: Summary of the calendar used by screen reader users for identifying the calendar and/or summarizing its purpose
|
163
163
|
* @type {string}
|
164
164
|
*/
|
165
165
|
summary: { type: String },
|
@@ -453,6 +453,9 @@ export class TableWrapper extends RtlMixin(PageableMixin(SelectionMixin(LitEleme
|
|
453
453
|
r.classList.toggle('d2l-table-row-first', r === firstRow);
|
454
454
|
r.classList.toggle('d2l-table-row-last', r === lastRow);
|
455
455
|
r.classList.toggle('d2l-table-selected-first', firstNonHeaderRow && isSelected);
|
456
|
+
if (r === lastRow) {
|
457
|
+
r.classList.remove('d2l-table-selected-previous');
|
458
|
+
}
|
456
459
|
|
457
460
|
Array.from(r.cells).forEach((c, index) => {
|
458
461
|
if (isHeader && !CSS.supports('selector(:has(a, b))')) this._checkSiblingSortableCells(c);
|
@@ -539,7 +542,6 @@ export class TableWrapper extends RtlMixin(PageableMixin(SelectionMixin(LitEleme
|
|
539
542
|
// observes mutations to <table>'s direct children and also
|
540
543
|
// its subtree (rows or cells added/removed to any descendant)
|
541
544
|
this._registerMutationObserver('_tableMutationObserver', this._handleTableChange.bind(this), this._table, {
|
542
|
-
attributes: true, /* required for legacy-Edge, otherwise attributeFilter throws a syntax error */
|
543
545
|
attributeFilter: ['selected'],
|
544
546
|
childList: true,
|
545
547
|
subtree: true
|
package/custom-elements.json
CHANGED
@@ -847,7 +847,7 @@
|
|
847
847
|
},
|
848
848
|
{
|
849
849
|
"name": "summary",
|
850
|
-
"description": "Summary of the calendar for
|
850
|
+
"description": "ACCESSIBILITY: Summary of the calendar used by screen reader users for identifying the calendar and/or summarizing its purpose",
|
851
851
|
"type": "string"
|
852
852
|
}
|
853
853
|
],
|
@@ -879,7 +879,7 @@
|
|
879
879
|
{
|
880
880
|
"name": "summary",
|
881
881
|
"attribute": "summary",
|
882
|
-
"description": "Summary of the calendar for
|
882
|
+
"description": "ACCESSIBILITY: Summary of the calendar used by screen reader users for identifying the calendar and/or summarizing its purpose",
|
883
883
|
"type": "string"
|
884
884
|
},
|
885
885
|
{
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.28.1",
|
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",
|