Skip to content

Commit ea5b4db

Browse files
committed
feat:a11y: hide and show on hower only for devices that support it and keep them always available for assitive technologies
1 parent 47827cd commit ea5b4db

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

app/components/Package/SkillsModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function getWarningTooltip(skill: SkillListItem): string | undefined {
133133
</code>
134134
<button
135135
type="button"
136-
class="absolute top-0 inset-ie-0 px-2 py-0.5 font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
136+
class="absolute top-0 inset-ie-0 px-2 py-0.5 font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70 media-mouse:not-focus:sr-only"
137137
:aria-label="$t('package.get_started.copy_command')"
138138
@click.stop="copyCommand"
139139
>

app/components/Terminal/Execute.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const copyExecuteCommand = () => copyExecute(getFullExecuteCommand())
7070
>
7171
<button
7272
type="button"
73-
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
73+
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70 media-mouse:not-focus:sr-only"
7474
:aria-label="$t('package.get_started.copy_command')"
7575
@click.stop="copyExecuteCommand"
7676
>

app/components/Terminal/Install.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const copyDevInstallCommand = () =>
153153
>
154154
<button
155155
type="button"
156-
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
156+
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70 media-mouse:not-focus:sr-only"
157157
:aria-label="$t('package.get_started.copy_command')"
158158
@click.stop="copyInstallCommand"
159159
>
@@ -190,7 +190,7 @@ const copyDevInstallCommand = () =>
190190
<ButtonBase
191191
type="button"
192192
size="small"
193-
class="text-fg-muted bg-bg-subtle/80 border-border opacity-0 group-hover/devinstallcmd:opacity-100 active:scale-95 focus-visible:opacity-100 select-none"
193+
class="text-fg-muted bg-bg-subtle/80 border-border media-mouse:not-focus:sr-only active:scale-95 focus-visible:opacity-100 select-none"
194194
:aria-label="$t('package.get_started.copy_dev_command')"
195195
@click.stop="copyDevInstallCommand"
196196
>
@@ -255,8 +255,8 @@ const copyDevInstallCommand = () =>
255255
>
256256
<button
257257
type="button"
258-
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
259-
:aria-label="$t('package.run.locally')"
258+
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70 media-mouse:not-focus:sr-only"
259+
:aria-label="$t('package.run.copy_command')"
260260
@click.stop="copyRunCommand(executableInfo?.primaryCommand)"
261261
>
262262
<span
@@ -305,7 +305,7 @@ const copyDevInstallCommand = () =>
305305
>
306306
<button
307307
type="button"
308-
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70"
308+
class="p-1 ms-1 flex items-center font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border border-solid rounded transition-colors duration-200 hover:(text-fg border-border-hover) active:scale-95 focus-visible:outline-accent/70 media-mouse:not-focus:sr-only"
309309
:aria-label="$t('package.create.copy_command')"
310310
@click.stop="copyCreateCommand"
311311
>

0 commit comments

Comments
 (0)