@ons/design-system 73.4.1 → 73.6.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.
- package/README.md +23 -0
- package/components/accordion/accordion.js +1 -0
- package/components/chart/_chart.scss +1 -3
- package/components/cookies-banner/_macro.njk +7 -2
- package/components/cookies-banner/_macro.spec.js +6 -0
- package/components/description-list/_description-list.scss +1 -1
- package/components/details/details.js +1 -0
- package/components/details/details.spec.js +3 -1
- package/components/header/_header.scss +0 -10
- package/components/hero/_hero.scss +2 -2
- package/components/icon/_macro.njk +159 -5
- package/components/list/_list.scss +0 -6
- package/components/skip-to-content/_macro.njk +4 -2
- package/components/summary/_summary.scss +2 -3
- package/components/table-of-contents/_macro.njk +1 -1
- package/components/table-of-contents/_macro.spec.js +17 -0
- package/css/main.css +1 -1
- package/js/cookies-functions.js +18 -1
- package/js/cookies-functions.spec.js +21 -0
- package/layout/_template.njk +1 -1
- package/package.json +12 -11
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +3 -3
- package/scss/base/_global.scss +1 -1
- package/scss/utilities/_highlight.scss +1 -1
- package/scss/vars/_grid.scss +1 -1
- package/scss/vars/_typography.scss +18 -18
|
@@ -101,6 +101,23 @@ describe('macro: table-of-contents', () => {
|
|
|
101
101
|
expect($('.ons-table-of-contents').attr('aria-label')).toBe('Contents');
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
+
it('renders a default aria label for the aside', () => {
|
|
105
|
+
const $ = cheerio.load(renderComponent('table-of-contents', EXAMPLE_TABLE_OF_CONTENTS_SINGLE));
|
|
106
|
+
|
|
107
|
+
expect($('.ons-table-of-contents-container').attr('aria-label')).toBe('Table of contents');
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('renders the provided `ariaLabelForAside`', () => {
|
|
111
|
+
const $ = cheerio.load(
|
|
112
|
+
renderComponent('table-of-contents', {
|
|
113
|
+
...EXAMPLE_TABLE_OF_CONTENTS_SINGLE,
|
|
114
|
+
ariaLabelForAside: 'Contents sidebar',
|
|
115
|
+
}),
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
expect($('.ons-table-of-contents-container').attr('aria-label')).toBe('Contents sidebar');
|
|
119
|
+
});
|
|
120
|
+
|
|
104
121
|
it('renders title as heading element', () => {
|
|
105
122
|
const $ = cheerio.load(renderComponent('table-of-contents', EXAMPLE_TABLE_OF_CONTENTS_SINGLE));
|
|
106
123
|
|