aria-role fixes

This commit is contained in:
kwaroran
2024-12-02 04:27:50 +09:00
parent 8f72b9e6e2
commit 0e292bd690
20 changed files with 99 additions and 42 deletions

View File

@@ -32,7 +32,7 @@
<span>{lore.name}</span>
{/if}
<div class="flex-grow flex justify-end">
<div class="text-textcolor2 hover:text-green-500 cursor-pointer" onclick={async (e) => {
<div class="text-textcolor2 hover:text-green-500 cursor-pointer" role="button" tabindex="0" onclick={async (e) => {
e.stopPropagation()
if(DBState.db.loreBook.length === 1){
return
@@ -44,6 +44,10 @@
loreBook.splice(ind, 1)
DBState.db.loreBook = loreBook
}
}} onkeydown={(e) => {
if(e.key === 'Enter'){
e.currentTarget.click()
}
}}>
<TrashIcon size={18}/>
</div>