voterunner

quick and dirty votes and discussions
git clone https://git.ce9e.org/voterunner.git

commit
2fef2ccbe4c636492d3d6a1a54fa5e256c0b0584
parent
ffd301b1db506ba07aed884a4bdca7da172b23a8
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2017-11-18 11:02
add aria roles

Diffstat

M static/src/voterunner.js 12 ++++++++++--

1 files changed, 10 insertions, 2 deletions


diff --git a/static/src/voterunner.js b/static/src/voterunner.js

@@ -102,6 +102,8 @@ var tplNode = function(nodes, node, ID) {
  102   102 		key: 'node-' + node.id,
  103   103 		id: 'node-' + node.id,
  104   104 		className: 'node ' + classList.join(' '),
   -1   105 		role: 'treeitem',
   -1   106 		'aria-expanded': '' + !!node.expanded,
  105   107 	}, [
  106   108 		h('article', {
  107   109 			className: 'body',
@@ -128,12 +130,18 @@ var tplNode = function(nodes, node, ID) {
  128   130 				},
  129   131 			}),
  130   132 		]),
  131    -1 		h('ul', {className: 'tree'}, tplFollowers(nodes, node.id, ID)),
   -1   133 		h('ul', {
   -1   134 			className: 'tree',
   -1   135 			role: 'group',
   -1   136 		}, tplFollowers(nodes, node.id, ID)),
  132   137 	]);
  133   138 };
  134   139 
  135   140 var template = function(nodes, ID) {
  136    -1 	return h('ul', {className: 'tree'}, tplFollowers(nodes, null, ID));
   -1   141 	return h('ul', {
   -1   142 		className: 'tree',
   -1   143 		role: 'tree',
   -1   144 	}, tplFollowers(nodes, null, ID));
  137   145 };
  138   146 
  139   147 var initVDom = function(wrapper, nodes, ID, afterRender) {