Skip to content

Commit 32d656f

Browse files
authored
Merge pull request #278 from silinternational/develop
Release 11.4.2 fix Drawer A11y warning
2 parents cf84d3c + 4de675d commit 32d656f

File tree

5 files changed

+63
-61
lines changed

5 files changed

+63
-61
lines changed

.github/workflows/deepfactor.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), enforced with [semantic-release](https://github.com/semantic-release/semantic-release).
4+
5+
### [11.4.2](https://github.com/silinternational/ui-components/compare/v11.4.1...v11.4.2) (2024-08-19)
6+
7+
8+
### Fixed
9+
10+
* **Drawer:** fix A11y warning in Drawer ([275d2b9](https://github.com/silinternational/ui-components/commit/275d2b9f0944e82da7b275f043afc11b6e9296c1))
11+
112
# Changelog
213

314
All notable changes to this project will be documented in this file.

components/mdc/Drawer/Drawer.svelte

Lines changed: 49 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ main {
118118
.main-content-height {
119119
height: var(--mdc-drawer-height);
120120
}
121+
.drawer-menu {
122+
display: flex;
123+
flex-direction: column;
124+
padding: 0;
125+
}
121126
</style>
122127

123128
<svelte:window on:resize={showAppropriateThings} />
@@ -138,50 +143,52 @@ main {
138143
<slot name="drawer-content-top" />
139144
<!-- override built-in padding so height 100 works correctly without creating a vertical scroller -->
140145
<!-- changing the list to flex causes the margins to not collapse -->
141-
<nav
142-
class="mdc-deprecated-list flex column p-0"
143-
class:h-100={isFullHeightMenu}
144-
on:click={onListClick}
145-
on:keyup={onListClick}
146-
bind:this={listElement}
147-
>
148-
{#each menuItems as { icon, label, url, urlPattern, hide, button, tooltip }, i}
149-
{#if label === '--break--'}
150-
<span class="grow-1" />
151-
{:else if !hide}
152-
<Tooltip.Wrapper ariaDescribedBy={label + '-tooltip'}>
153-
{#if button && isNotMini}
154-
<Button class="m-1" raised prependIcon={icon} {url}>{label}</Button>
155-
{:else if button}
156-
<IconButton class="mdc-theme--primary pl-1" {icon} ariaLabel={label} {url} />
157-
{:else if url}
158-
<a
159-
class="mdc-deprecated-list-item"
160-
class:mdc-deprecated-list-item--activated={isMenuItemActive(currentUrl, url, urlPattern)}
161-
href={url}
162-
aria-current={isMenuItemActive(currentUrl, url, urlPattern) ? 'page' : null}
163-
tabindex={i === 0 ? 0 : undefined}
164-
>
165-
<span class="mdc-deprecated-list-item__ripple" />
166-
{#if icon}
167-
<i class="material-icons mdc-deprecated-list-item__graphic" aria-hidden="true">{icon}</i>
168-
{/if}
169-
170-
{#if label && isNotMini}
171-
<span class="mdc-deprecated-list-item__text">{label}</span>
172-
{/if}
173-
</a>
174-
{:else}
175-
<hr
176-
class="mdc-deprecated-list-divider mdc-deprecated-list-divider--inset-leading mdc-deprecated-list-divider--inset-trailing"
177-
/>
146+
<nav class:h-100={isFullHeightMenu} bind:this={listElement}>
147+
<div
148+
class="drawer-menu mdc-deprecated-list"
149+
role="button"
150+
tabindex="-1"
151+
on:click={onListClick}
152+
on:keyup={onListClick}
153+
>
154+
{#each menuItems as { icon, label, url, urlPattern, hide, button, tooltip }, i}
155+
{#if label === '--break--'}
156+
<span class="grow-1" />
157+
{:else if !hide}
158+
<Tooltip.Wrapper ariaDescribedBy={label + '-tooltip'}>
159+
{#if button && isNotMini}
160+
<Button class="m-1" raised prependIcon={icon} {url}>{label}</Button>
161+
{:else if button}
162+
<IconButton class="mdc-theme--primary pl-1" {icon} ariaLabel={label} {url} />
163+
{:else if url}
164+
<a
165+
class="mdc-deprecated-list-item"
166+
class:mdc-deprecated-list-item--activated={isMenuItemActive(currentUrl, url, urlPattern)}
167+
href={url}
168+
aria-current={isMenuItemActive(currentUrl, url, urlPattern) ? 'page' : null}
169+
tabindex={i === 0 ? 0 : undefined}
170+
>
171+
<span class="mdc-deprecated-list-item__ripple" />
172+
{#if icon}
173+
<i class="material-icons mdc-deprecated-list-item__graphic" aria-hidden="true">{icon}</i>
174+
{/if}
175+
176+
{#if label && isNotMini}
177+
<span class="mdc-deprecated-list-item__text">{label}</span>
178+
{/if}
179+
</a>
180+
{:else}
181+
<hr
182+
class="mdc-deprecated-list-divider mdc-deprecated-list-divider--inset-leading mdc-deprecated-list-divider--inset-trailing"
183+
/>
184+
{/if}
185+
</Tooltip.Wrapper>
186+
{#if tooltip}
187+
<Tooltip tooltipID={label + '-tooltip'}>{tooltip}</Tooltip>
178188
{/if}
179-
</Tooltip.Wrapper>
180-
{#if tooltip}
181-
<Tooltip tooltipID={label + '-tooltip'}>{tooltip}</Tooltip>
182189
{/if}
183-
{/if}
184-
{/each}
190+
{/each}
191+
</div>
185192
</nav>
186193
</div>
187194
</aside>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@silintl/ui-components",
3-
"version": "11.4.1",
3+
"version": "11.4.2",
44
"description": "Reusable Svelte components for some internal applications",
55
"main": "index.mjs",
66
"module": "index.mjs",

0 commit comments

Comments
 (0)