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

@@ -73,7 +73,7 @@
<CheckCircle2Icon size={18}/>
</button>
{:else if DBState.db.enabledModules.includes(rmodule.id)}
<button class="mr-2 text-textcolor2 cursor-not-allowed">
<button class="mr-2 text-textcolor2 cursor-not-allowed"aria-labelledby="disabled">
</button>
{:else}
<button class={(!DBState.db.characters[$selectedCharID].chats[DBState.db.characters[$selectedCharID].chatPage].modules.includes(rmodule.id)) ?

View File

@@ -43,13 +43,17 @@
<span>{presets.name}</span>
{/if}
<div class="flex-grow flex justify-end">
<div class="text-textcolor2 hover:text-green-500 cursor-pointer mr-2" onclick={(e) => {
<div class="text-textcolor2 hover:text-green-500 cursor-pointer mr-2" role="button" tabindex="0" onclick={(e) => {
e.stopPropagation()
copyPreset(i)
}} onkeydown={(e) => {
if(e.key === 'Enter'){
e.currentTarget.click()
}
}}>
<CopyIcon size={18}/>
</div>
<div class="text-textcolor2 hover:text-green-500 cursor-pointer mr-2" onclick={async (e) => {
<div class="text-textcolor2 hover:text-green-500 cursor-pointer mr-2" role="button" tabindex="0" onclick={async (e) => {
e.stopPropagation()
const data = await alertCardExport('preset')
console.log(data.type)
@@ -59,11 +63,15 @@
if(data.type === 'realm'){
$ShowRealmFrameStore = `preset:${i}`
}
}} onkeydown={(e) => {
if(e.key === 'Enter'){
e.currentTarget.click()
}
}}>
<Share2Icon size={18} />
</div>
<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.botPresets.length === 1){
alertError(language.errors.onlyOneChat)
@@ -77,6 +85,10 @@
DBState.db.botPresets = botPresets
changeToPreset(0, false)
}
}} onkeydown={(e) => {
if(e.key === 'Enter'){
e.currentTarget.click()
}
}}>
<TrashIcon size={18}/>
</div>

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>