Improved accessibility (#118):

* adding role="button" or type="button" where missing.
This commit is contained in:
John Livingston
2024-08-20 15:30:45 +02:00
parent 9e252193d4
commit cee42b4bcc
11 changed files with 24 additions and 19 deletions

View File

@ -41,12 +41,12 @@ export function tplMucNote (el, note) {
<converse-icon class="fa fa-magnifying-glass" size="1em" title=${i18nSearch}></converse-icon>
</button>`
}
<button class="note-action" title="${__('Edit')}"
<button type="button" class="note-action" title="${__('Edit')}"
@click=${el.toggleEdit}
>
<converse-icon class="fa fa-edit" size="1em"></converse-icon>
</button>
<button class="note-action" title="${i18nDelete}"
<button type="button" class="note-action" title="${i18nDelete}"
@click=${el.deleteNote}
>
<converse-icon class="fa fa-trash-alt" size="1em"></converse-icon>

View File

@ -25,7 +25,7 @@ function tplFilters (el) {
></livechat-converse-muc-note-occupant>`
: ''
}
<button class="notes-action" @click=${(ev) => {
<button type="button" class="notes-action" @click=${(ev) => {
ev?.preventDefault()
el.filterNotes({})
}} title="${__('Close')}">
@ -85,7 +85,7 @@ function tplCreateButton (el) {
const i18nCreateNote = __(LOC_moderator_note_create)
return html`
<div class="notes-actions">
<button class="notes-action" title="${i18nCreateNote}" @click=${el.openCreateNoteForm}>
<button type="button" class="notes-action" title="${i18nCreateNote}" @click=${el.openCreateNoteForm}>
<converse-icon class="fa fa-plus" size="1em"></converse-icon>
</button>
</div>`