Compare commits

..

3 Commits

Author SHA1 Message Date
Cory LaViska
0dfef125e0 on second thought 2025-02-03 11:40:23 -05:00
Cory LaViska
22092ed87f Merge branch 'next' into select-tag-fix 2025-02-03 11:36:35 -05:00
Cory LaViska
a091c6cd6b add tag-counter part to wa-select 2025-02-03 11:36:03 -05:00
3 changed files with 3 additions and 16 deletions

View File

@@ -18,9 +18,6 @@ During the alpha period, things might break! We take breaking changes very serio
- Added the `tag` part (and associated exported parts) to `<wa-select>` to allow targeting the tag that shows when more than the max number of visible items have been selected
- Fixed a number of broken event listeners throughout the docs
- Fixed a bug in `<wa-card>` that prevented slots from showing automatically without `with-` attributes
- Fixed a bug in `<wa-select>` that prevented the placeholder color from being customized with the `--wa-form-control-placeholder-color` token
- Improved accessibility of `<wa-carousel>`
## 3.0.0-alpha.10

View File

@@ -378,16 +378,8 @@ export default class WaCarousel extends WebAwesomeElement {
this.getSlides({ excludeClones: false }).forEach((slide, index) => {
slide.classList.remove('--in-view');
slide.classList.remove('--is-active');
slide.setAttribute('role', 'group');
slide.setAttribute('aria-label', this.localize.term('slideNum', index + 1));
if (this.pagination) {
slide.setAttribute('role', 'tabpanel');
slide.removeAttribute('aria-label');
slide.setAttribute('aria-labelledby', `tab-${index + 1}`);
slide.setAttribute('id', `slide-${index + 1}`);
}
if (slide.hasAttribute('data-clone')) {
slide.remove();
}
@@ -641,7 +633,7 @@ export default class WaCarousel extends WebAwesomeElement {
: ''}
${this.pagination
? html`
<div part="pagination" role="tablist" class="pagination">
<div part="pagination" role="tablist" class="pagination" aria-controls="scroll-container">
${map(range(pagesCount), index => {
const isActive = index === currentPage;
return html`
@@ -652,10 +644,8 @@ export default class WaCarousel extends WebAwesomeElement {
'pagination-item--active': isActive,
})}"
role="tab"
id="tab-${index + 1}"
aria-controls="slide-${index + 1}"
aria-selected="${isActive ? 'true' : 'false'}"
${isActive ? '' : `aria-label="${this.localize.term('goToSlide', index + 1, pagesCount)}"`}
aria-label="${this.localize.term('goToSlide', index + 1, pagesCount)}"
tabindex=${isActive ? '0' : '-1'}
@click=${() => this.goToSlide(index * slidesPerMove)}
@keydown=${this.handleKeyDown}

View File

@@ -72,7 +72,7 @@
}
&::placeholder {
color: var(--wa-form-control-placeholder-color);
color: var(--wa-form-controls-placeholder-color);
}
}