Skip to content

Commit 504ff11

Browse files
committed
namefrom-heading script additions blocking w3c/aria#1860
1 parent b1219af commit 504ff11

File tree

1 file changed

+13
-34
lines changed

1 file changed

+13
-34
lines changed

script/aria.js

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,8 @@ function ariaAttributeReferences() {
217217
var subRoles = [];
218218
var roleIndex = '';
219219
var fromAuthor = '';
220+
var fromHeading = "";
220221
var fromContent = '';
221-
var fromEncapsulation = '';
222-
var fromLegend = '';
223222
var fromProhibited = '';
224223

225224
Array.prototype.slice
@@ -358,8 +357,8 @@ function ariaAttributeReferences() {
358357
req +
359358
'</li>';
360359
}
361-
if (!isAbstract && node.textContent.indexOf('content') !== -1) {
362-
fromContent +=
360+
if (node.textContent.indexOf('heading') !== -1) {
361+
fromHeading +=
363362
'<li><a href="#' +
364363
pnID +
365364
'" class="role-reference"><code>' +
@@ -368,18 +367,8 @@ function ariaAttributeReferences() {
368367
req +
369368
'</li>';
370369
}
371-
if (node.textContent.indexOf('prohibited') !== -1) {
372-
fromProhibited +=
373-
'<li><a href="#' +
374-
pnID +
375-
'" class="role-reference"><code>' +
376-
content +
377-
'</code></a>' +
378-
req +
379-
'</li>';
380-
}
381-
if (node.textContent.indexOf('encapsulation') !== -1) {
382-
fromEncapsulation +=
370+
if (!isAbstract && node.textContent.indexOf('content') !== -1) {
371+
fromContent +=
383372
'<li><a href="#' +
384373
pnID +
385374
'" class="role-reference"><code>' +
@@ -388,8 +377,8 @@ function ariaAttributeReferences() {
388377
req +
389378
'</li>';
390379
}
391-
if (node.textContent.indexOf('legend') !== -1) {
392-
fromLegend +=
380+
if (node.textContent.indexOf('prohibited') !== -1) {
381+
fromProhibited +=
393382
'<li><a href="#' +
394383
pnID +
395384
'" class="role-reference"><code>' +
@@ -677,33 +666,23 @@ function ariaAttributeReferences() {
677666
parentNode.replaceChild(list, node);
678667
}
679668

680-
node = document.getElementById('index_fromcontent');
681-
if (node) {
682-
parentNode = node.parentNode;
683-
list = document.createElement('ul');
684-
list.id = 'index_fromcontent';
685-
list.className = 'compact';
686-
list.innerHTML = fromContent;
687-
parentNode.replaceChild(list, node);
688-
}
689-
690-
node = document.getElementById('index_fromencapsulation');
669+
node = document.getElementById('index_fromheading');
691670
if (node) {
692671
parentNode = node.parentNode;
693672
list = document.createElement('ul');
694-
list.id = 'index_fromencapsulation';
673+
list.id = 'index_fromheading';
695674
list.className = 'compact';
696-
list.innerHTML = fromEncapsulation;
675+
list.innerHTML = fromHeading;
697676
parentNode.replaceChild(list, node);
698677
}
699678

700-
node = document.getElementById('index_fromlegend');
679+
node = document.getElementById('index_fromcontent');
701680
if (node) {
702681
parentNode = node.parentNode;
703682
list = document.createElement('ul');
704-
list.id = 'index_fromlegend';
683+
list.id = 'index_fromcontent';
705684
list.className = 'compact';
706-
list.innerHTML = fromLegend;
685+
list.innerHTML = fromContent;
707686
parentNode.replaceChild(list, node);
708687
}
709688

0 commit comments

Comments
 (0)