fix: a11y

This commit is contained in:
Julian Sommer
2026-03-24 14:02:26 +10:00
parent 58a9d5741f
commit d47f2ab4fd
2 changed files with 6 additions and 6 deletions
@@ -30,7 +30,7 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
import { formatDateTime } from "@/lib/utils"
import { formatDateTime, getNameTag } from "@/lib/utils"
import {
useAttachVolume,
useDeleteVolume,
@@ -319,9 +319,7 @@ function VolumeDetail() {
</SelectTrigger>
<SelectContent>
{runningInstances.map((instance) => {
const name = instance.Tags?.find(
(t) => t.Key === "Name",
)?.Value
const name = getNameTag(instance.Tags)
return (
<SelectItem
key={instance.InstanceId}
@@ -47,8 +47,8 @@ export function ObjectListItem({
link.remove()
URL.revokeObjectURL(url)
}
} catch {
throw new Error("Failed to download object")
} catch (error) {
throw new Error("Failed to download object", { cause: error })
}
}
@@ -88,6 +88,7 @@ export function ObjectListItem({
{formatSize(object.Size ?? 0)}
</div>
<button
aria-label={`Download ${displayName}`}
className="rounded-md p-2 transition-colors hover:bg-accent"
onClick={downloadObject}
type="button"
@@ -95,6 +96,7 @@ export function ObjectListItem({
<Download className="size-4" />
</button>
<button
aria-label={`Delete ${displayName}`}
className="rounded-md p-2 text-destructive transition-colors hover:bg-accent"
onClick={() => setShowDeleteDialog(true)}
type="button"