mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
* a11y: add aria roles to habit control * a11y: add role to todo checkboxes * a11y: add aria-labels to score buttons Helps with screen readers * add i18n to aria-labels
This commit is contained in:
@@ -32,6 +32,9 @@
|
|||||||
'task-not-scoreable': showTaskLockIcon,
|
'task-not-scoreable': showTaskLockIcon,
|
||||||
}, controlClass.up.inner]"
|
}, controlClass.up.inner]"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
role="button"
|
||||||
|
:aria-label="$t('scoreUp')"
|
||||||
|
:aria-disabled="showTaskLockIcon || (!task.up && !showTaskLockIcon)"
|
||||||
@click="score('up')"
|
@click="score('up')"
|
||||||
@keypress.enter="score('up')"
|
@keypress.enter="score('up')"
|
||||||
>
|
>
|
||||||
@@ -63,6 +66,7 @@
|
|||||||
controlClass.inner,
|
controlClass.inner,
|
||||||
]"
|
]"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
role="checkbox"
|
||||||
@click="score(showCheckIcon ? 'down' : 'up' )"
|
@click="score(showCheckIcon ? 'down' : 'up' )"
|
||||||
@keypress.enter="score(showCheckIcon ? 'down' : 'up' )"
|
@keypress.enter="score(showCheckIcon ? 'down' : 'up' )"
|
||||||
>
|
>
|
||||||
@@ -359,6 +363,9 @@
|
|||||||
'task-not-scoreable': showTaskLockIcon,
|
'task-not-scoreable': showTaskLockIcon,
|
||||||
}, controlClass.down.inner]"
|
}, controlClass.down.inner]"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
role="button"
|
||||||
|
:aria-label="$t('scoreDown')"
|
||||||
|
:aria-disabled="showTaskLockIcon || (!task.down && !showTaskLockIcon)"
|
||||||
@click="score('down')"
|
@click="score('down')"
|
||||||
@keypress.enter="score('down')"
|
@keypress.enter="score('down')"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -133,5 +133,7 @@
|
|||||||
"addTags": "Add tags...",
|
"addTags": "Add tags...",
|
||||||
"enterTag": "Enter a tag",
|
"enterTag": "Enter a tag",
|
||||||
"pressEnterToAddTag": "Press Enter to add tag: '<%= tagName %>'",
|
"pressEnterToAddTag": "Press Enter to add tag: '<%= tagName %>'",
|
||||||
"taskSummary": "<%= type %> Summary"
|
"taskSummary": "<%= type %> Summary",
|
||||||
|
"scoreUp": "Score up",
|
||||||
|
"scoreDown": "Score down"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user