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
diff --git a/src/components/Mixins/TableRowExpandMixin.js b/src/components/Mixins/TableRowExpandMixin.js
new file mode 100644
index 0000000..fad63c6
--- /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;