Skip to content

Commit

Permalink
Bugfixes, link updates
Browse files Browse the repository at this point in the history
  • Loading branch information
endigo9740 committed Nov 8, 2023
1 parent a65a508 commit 504f392
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 8 additions & 2 deletions packages/skeleton/src/lib/components/AppRail/AppRailTile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@
function onKeyDown(event: SvelteEvent<KeyboardEvent, HTMLButtonElement>): void {
if (['Enter', 'Space'].includes(event.code)) {
event.preventDefault();
elemInput.click();
selectElemInput();
}
}
function selectElemInput(): void {
elemInput.click();
}
// RestProps
function prunedRestProps() {
delete $$restProps.class;
Expand All @@ -76,7 +80,9 @@

<label class="app-rail-tile {classesBase}" data-testid="app-rail-tile" {title} on:mouseover on:mouseleave on:focus on:blur>
<!-- A11y attributes are not allowed on <label> -->
<button class="app-rail-wrapper {classesWrapper}" tabindex="0" on:keydown={onKeyDown} on:keyup on:keypress>
<!-- FIXME: resolve a11y warnings -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<button class="app-rail-wrapper {classesWrapper}" tabindex="0" on:click={selectElemInput} on:keydown={onKeyDown} on:keyup on:keypress>
<!-- NOTE: Don't use `hidden` as it prevents `required` from operating -->
<div class="h-0 w-0 overflow-hidden">
<input bind:this={elemInput} type="radio" bind:group {name} {value} {...prunedRestProps()} tabindex="-1" on:click on:change />
Expand Down
3 changes: 1 addition & 2 deletions packages/skeleton/src/lib/components/Table/Table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@
>
{#each row as cell, cellIndex}
<!-- Cell -->
<!-- prettier-ignore -->
<td
class="{regionCell}"
role={interactive ? "gridcell" : "cell"}
role="gridcell"
aria-colindex={cellIndex + 1}
tabindex={cellIndex === 0 && interactive ? 0 : -1}
>
Expand Down

0 comments on commit 504f392

Please sign in to comment.