From 504ff116a4dd40db65f3b60353f0aefa1bfbc3b0 Mon Sep 17 00:00:00 2001 From: James Craig Date: Thu, 16 Feb 2023 00:27:21 -0800 Subject: [PATCH] namefrom-heading script additions blocking https://github.com/w3c/aria/pull/1860 --- script/aria.js | 47 +++++++++++++---------------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/script/aria.js b/script/aria.js index 38c02a0..c4df7c1 100644 --- a/script/aria.js +++ b/script/aria.js @@ -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 @@ -358,8 +357,8 @@ function ariaAttributeReferences() { req + ''; } - if (!isAbstract && node.textContent.indexOf('content') !== -1) { - fromContent += + if (node.textContent.indexOf('heading') !== -1) { + fromHeading += '
  • ' + @@ -368,18 +367,8 @@ function ariaAttributeReferences() { req + '
  • '; } - if (node.textContent.indexOf('prohibited') !== -1) { - fromProhibited += - '
  • ' + - content + - '' + - req + - '
  • '; - } - if (node.textContent.indexOf('encapsulation') !== -1) { - fromEncapsulation += + if (!isAbstract && node.textContent.indexOf('content') !== -1) { + fromContent += '
  • ' + @@ -388,8 +377,8 @@ function ariaAttributeReferences() { req + '
  • '; } - if (node.textContent.indexOf('legend') !== -1) { - fromLegend += + if (node.textContent.indexOf('prohibited') !== -1) { + fromProhibited += '
  • ' + @@ -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); }