Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 13 additions & 34 deletions script/aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ function ariaAttributeReferences() {
var subRoles = [];
var roleIndex = '';
var fromAuthor = '';
var fromHeading = "";
var fromContent = '';
var fromEncapsulation = '';
var fromLegend = '';
var fromProhibited = '';

Array.prototype.slice
Expand Down Expand Up @@ -358,8 +357,8 @@ function ariaAttributeReferences() {
req +
'</li>';
}
if (!isAbstract && node.textContent.indexOf('content') !== -1) {
fromContent +=
if (node.textContent.indexOf('heading') !== -1) {
fromHeading +=
'<li><a href="#' +
pnID +
'" class="role-reference"><code>' +
Expand All @@ -368,18 +367,8 @@ function ariaAttributeReferences() {
req +
'</li>';
}
if (node.textContent.indexOf('prohibited') !== -1) {
Copy link
Contributor Author

@cookiecrook cookiecrook Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI GitHub diff viewer looks jumbled below due to line-by-line diffs, but this was a removal of the defunct nameFrom: encapsulation and nameFrom: legend blocks, along with the blocks for nameFrom: heading… Viewer is interspersing those changes making the diff look more complicated than it is.

fromProhibited +=
'<li><a href="#' +
pnID +
'" class="role-reference"><code>' +
content +
'</code></a>' +
req +
'</li>';
}
if (node.textContent.indexOf('encapsulation') !== -1) {
fromEncapsulation +=
if (!isAbstract && node.textContent.indexOf('content') !== -1) {
fromContent +=
'<li><a href="#' +
pnID +
'" class="role-reference"><code>' +
Expand All @@ -388,8 +377,8 @@ function ariaAttributeReferences() {
req +
'</li>';
}
if (node.textContent.indexOf('legend') !== -1) {
fromLegend +=
if (node.textContent.indexOf('prohibited') !== -1) {
fromProhibited +=
'<li><a href="#' +
pnID +
'" class="role-reference"><code>' +
Expand Down Expand Up @@ -677,33 +666,23 @@ function ariaAttributeReferences() {
parentNode.replaceChild(list, node);
}

node = document.getElementById('index_fromcontent');
if (node) {
parentNode = node.parentNode;
list = document.createElement('ul');
list.id = 'index_fromcontent';
list.className = 'compact';
list.innerHTML = fromContent;
parentNode.replaceChild(list, node);
}

node = document.getElementById('index_fromencapsulation');
node = document.getElementById('index_fromheading');
if (node) {
parentNode = node.parentNode;
list = document.createElement('ul');
list.id = 'index_fromencapsulation';
list.id = 'index_fromheading';
list.className = 'compact';
list.innerHTML = fromEncapsulation;
list.innerHTML = fromHeading;
parentNode.replaceChild(list, node);
}

node = document.getElementById('index_fromlegend');
node = document.getElementById('index_fromcontent');
if (node) {
parentNode = node.parentNode;
list = document.createElement('ul');
list.id = 'index_fromlegend';
list.id = 'index_fromcontent';
list.className = 'compact';
list.innerHTML = fromLegend;
list.innerHTML = fromContent;
parentNode.replaceChild(list, node);
}

Expand Down