summaryrefslogtreecommitdiff
path: root/src/components/Mixins
diff options
context:
space:
mode:
authorDixsie Wolmers <dixsie@ibm.com>2020-09-08 22:13:38 +0300
committerDerick Montague <derick.montague@ibm.com>2020-10-05 23:10:23 +0300
commitb53e086876138f065bd0d976432a7eb75d254cd6 (patch)
tree410f5d7947211ff93c295a9ea366be9ac4879cdb /src/components/Mixins
parent741f375e22d8e3df13e22a015b9fd4a7999f6903 (diff)
downloadwebui-vue-b53e086876138f065bd0d976432a7eb75d254cd6.tar.xz
Fix hardware status expand button accessiblity
- Aria label added to provide screen readers context for button action - Title added to chevron icon to display label on hover Signed-off-by: Dixsie Wolmers <dixsie@ibm.com> Change-Id: Ib8c0cef36d7aa61e0b4b0ac7fdabffb7e8a0a17a
Diffstat (limited to 'src/components/Mixins')
-rw-r--r--src/components/Mixins/TableRowExpandMixin.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/Mixins/TableRowExpandMixin.js b/src/components/Mixins/TableRowExpandMixin.js
new file mode 100644
index 00000000..fad63c61
--- /dev/null
+++ b/src/components/Mixins/TableRowExpandMixin.js
@@ -0,0 +1,17 @@
+const TableRowExpandMixin = {
+ data() {
+ return {
+ expandRowLabel: this.$t('global.table.expandTableRow')
+ };
+ },
+ methods: {
+ toggleRowDetails(row) {
+ row.toggleDetails();
+ row.detailsShowing
+ ? (this.expandRowLabel = this.$t('global.table.expandTableRow'))
+ : (this.expandRowLabel = this.$t('global.table.collapseTableRow'));
+ }
+ }
+};
+
+export default TableRowExpandMixin;