add accessibility to open and close buttons (#311)
refactor the way to focus apps when the menu is opened (#301)
This commit is contained in:
@@ -15,11 +15,18 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<template>
|
||||
<button class="side-menu-opener side-menu-closer"></button>
|
||||
<button class="side-menu-opener side-menu-closer" :arial-label="label">
|
||||
<span v-text="label"></span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CloserButton',
|
||||
data() {
|
||||
return {
|
||||
label: t('side_menu', 'Close the menu'),
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -15,7 +15,9 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<template>
|
||||
<button class="side-menu-opener" :arial-label="label"></button>
|
||||
<button class="side-menu-opener" :arial-label="label">
|
||||
<span v-text="label"></span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -23,7 +25,7 @@ export default {
|
||||
name: 'OpenerButton',
|
||||
data() {
|
||||
return {
|
||||
label: t('side_menu', 'Toggle menu'),
|
||||
label: t('side_menu', 'Toggle the menu'),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,4 +95,4 @@
|
||||
"Hide labels on mouse over": ""
|
||||
"Except the hovered app": ""
|
||||
"Search": ""
|
||||
"Toggle menu": ""
|
||||
"Toggle the menu": ""
|
||||
|
||||
@@ -3,7 +3,13 @@ module.exports = (tagName, attributes) => {
|
||||
|
||||
if (typeof attributes === 'object') {
|
||||
for (let i in attributes) {
|
||||
element.setAttribute(i, attributes[i])
|
||||
if (i === 'text') {
|
||||
element.textContent = attributes[i]
|
||||
} else if (i === 'html') {
|
||||
element.innerHTML = attributes[i]
|
||||
} else {
|
||||
element.setAttribute(i, attributes[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user