Skip to content

Commit b0e0a63

Browse files
committed
Non-global global States and Properties
Fixes #82
1 parent bac830d commit b0e0a63

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

script/aria.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,27 @@ function ariaAttributeReferences() {
634634
placeholder.innerHTML = output;
635635
}
636636
}
637+
else if (
638+
placeholder &&
639+
(placeholder.textContent || placeholder.innerText) ===
640+
'All elements of the base markup except for some roles or elements that prohibit its use' &&
641+
item.roles.length
642+
) {
643+
// for prohibited roles the roles list just includes those roles which are prohibited... weird I know but it is what it is
644+
var sortedList = [];
645+
sortedList = item.roles.sort();
646+
//remove roletype from the sorted list
647+
const index = sortedList.indexOf('roletype');
648+
if (index > -1) {
649+
sortedList.splice(index, 1);
650+
}
651+
output += 'All elements of the base markup except for the following roles: ';
652+
for (var j = 0; j < sortedList.length-1; j++) {
653+
output += '<rref>' + sortedList[j] + '</rref>, ';
654+
}
655+
output += '<rref>' + sortedList[sortedList.length-1] + '</rref>';
656+
placeholder.innerHTML = output;
657+
}
637658
});
638659

639660
// spit out the index

0 commit comments

Comments
 (0)